Skip to content

Commit

Permalink
Merge 2d1d04d into 81c6e62
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Jul 11, 2020
2 parents 81c6e62 + 2d1d04d commit adbd07b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/protocol/http1/connection.rb
Expand Up @@ -136,8 +136,14 @@ def close
end

def write_request(authority, method, path, version, headers)
host = authority
if headers.include?("host")
host = headers["host"]
headers.delete "host"
end

@stream.write("#{method} #{path} #{version}\r\n")
@stream.write("host: #{authority}\r\n")
@stream.write("host: #{host}\r\n")

write_headers(headers)
end
Expand Down

0 comments on commit adbd07b

Please sign in to comment.