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 | 9c494ae351a494714ee5ba784858075d2b6b4eca (patch) | |
| tree | 322cd8df1982d70117ad6aad7fd5c4e0c1369be7 /lib | |
| parent | 57d465595cc95a0124688c07a9da9473f9c133b6 (diff) | |
| download | ruby-9c494ae351a494714ee5ba784858075d2b6b4eca.tar.gz ruby-9c494ae351a494714ee5ba784858075d2b6b4eca.tar.xz ruby-9c494ae351a494714ee5ba784858075d2b6b4eca.zip | |
* 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
Diffstat (limited to 'lib')
| -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 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 ) |
