From 3eea2999e7af05521c57794f49014d8fb67d1be3 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/net/http.rb b/lib/net/http.rb index 2afe3873f1..b78c0ef9a5 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 v1.2.3