We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b59a1bb commit 82c52b9Copy full SHA for 82c52b9
lib/rack/reverse_proxy.rb
@@ -45,8 +45,8 @@ def call(env)
45
body << segment
46
end
47
48
- h = res.to_hash.reject { |k,v| k.downcase == 'status' }
49
- [res.code, Rack::Utils::HeaderHash.new(h), [body]]
+
+ [res.code, create_response_headers(res), [body]]
50
}
51
52
@@ -66,6 +66,14 @@ def get_matcher_and_url path
66
67
68
69
+ def create_response_headers http_response
70
+ response_headers = Rack::Utils::HeaderHash.new(http_response.to_hash)
71
+ # handled by Rack
72
+ response_headers.delete('status')
73
+ # TODO: Verify Content Length, and required Rack headers
74
+ response_headers
75
+ end
76
77
def match_path(path, matcher)
78
if matcher.is_a?(Regexp)
79
path.match(matcher)
0 commit comments