Merge pull request #28 from aardvarkk/master

Don't copy HTTP_VERSION from the source to the target request
This commit is contained in:
James Hu 2018-04-18 15:36:25 -07:00 committed by GitHub
commit ca11aba415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ module ReverseProxy
def extract_http_request_headers(env) def extract_http_request_headers(env)
headers = env.reject do |k, v| headers = env.reject do |k, v|
!(/^HTTP_[A-Z_]+$/ === k) || v.nil? !(/^HTTP_[A-Z_]+$/ === k) || k == "HTTP_VERSION" || v.nil?
end.map do |k, v| end.map do |k, v|
[reconstruct_header_name(k), v] [reconstruct_header_name(k), v]
end.inject(Rack::Utils::HeaderHash.new) do |hash, k_v| end.inject(Rack::Utils::HeaderHash.new) do |hash, k_v|