From 9c494ae351a494714ee5ba784858075d2b6b4eca Mon Sep 17 00:00:00 2001 From: aamine Date: Thu, 21 Nov 2002 11:01:22 +0000 Subject: * lib/net/http.rb: should not overwrite Host: header. (Original patch is contributed by sean@ruby-lang.org) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/net') diff --git a/lib/net/http.rb b/lib/net/http.rb index 2afe3873f..b78c0ef9a 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -889,7 +889,7 @@ module Net if not req.response_body_permitted? and @close_on_empty_response then req['connection'] = 'close' end - req['host'] = addr_port() + req['host'] ||= addr_port() end def end_transport( req, res ) -- cgit