diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-21 11:01:22 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-21 11:01:22 +0000 |
commit | 3eea2999e7af05521c57794f49014d8fb67d1be3 (patch) | |
tree | 322cd8df1982d70117ad6aad7fd5c4e0c1369be7 /lib/net/http.rb | |
parent | 87239525c176090d1de32ad4aac5341f330a5a63 (diff) | |
download | ruby-3eea2999e7af05521c57794f49014d8fb67d1be3.tar.gz |
* 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
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r-- | lib/net/http.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 ) |