Ruby: rack - remove MIME modelling

This commit is contained in:
Alex Ford
2023-06-20 14:57:23 +01:00
parent 75ccbe58ee
commit 7aec22c1e4
5 changed files with 5 additions and 1323 deletions

View File

@@ -7,9 +7,8 @@
*/
module Rack {
import rack.internal.App
import rack.internal.Mime
import rack.internal.Response::Public as Response
import rack.internal.Response::Public as Response
/** DEPRECATED: Alias for App::AppCandidate */
deprecated class AppCandidate = App::AppCandidate;
/** DEPRECATED: Alias for App::AppCandidate */
deprecated class AppCandidate = App::AppCandidate;
}

File diff suppressed because it is too large Load Diff

View File

@@ -6,8 +6,6 @@ rackApps
| rack.rb:59:1:75:3 | Baz | rack.rb:60:12:60:14 | env |
rackResponseContentTypes
| rack.rb:8:5:8:38 | call to [] | rack.rb:7:34:7:45 | "text/plain" |
| rack.rb:20:5:20:27 | call to [] | rack.rb:19:28:19:54 | call to mime_type |
mimetypeCalls
| rack.rb:19:28:19:54 | call to mime_type | application/x-gzip |
| rack.rb:20:5:20:27 | call to [] | rack.rb:19:28:19:38 | "text/html" |
redirectResponses
| rack.rb:43:5:43:45 | call to [] | rack.rb:42:30:42:40 | "/foo.html" |

View File

@@ -12,10 +12,6 @@ query predicate rackResponseContentTypes(
contentType = resp.getMimetypeOrContentTypeArg()
}
query predicate mimetypeCalls(Rack::Mime::MimetypeCall c, string mimetype) {
mimetype = c.getMimetype()
}
query predicate redirectResponses(Rack::Response::RedirectResponse resp, DataFlow::Node location) {
location = resp.getRedirectLocation()
}

View File

@@ -16,7 +16,7 @@ class Proxy
def call(the_env)
status, headers, body = @app.call(the_env)
headers.content_type = Rack::Mime.mime_type(".gz")
headers.content_type = "text/html"
[status, headers, body]
end
end