summaryrefslogtreecommitdiffstats
path: root/lib/net
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-13 08:55:55 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-13 08:55:55 +0000
commita43313787f42fbf56c2551c7442b92e966ede353 (patch)
tree292477a94e36da409b5d75087bd60225540aac7c /lib/net
parentea455da9d8dba376e9a0b71d89cbe08ab4ca77eb (diff)
downloadruby-a43313787f42fbf56c2551c7442b92e966ede353.tar.gz
ruby-a43313787f42fbf56c2551c7442b92e966ede353.tar.xz
ruby-a43313787f42fbf56c2551c7442b92e966ede353.zip
* lib/net/http.rb (begin_transport): should not overwrite HTTP request header. [ruby-list:39543]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/http.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 0b7e20633..8280c6a03 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -944,12 +944,12 @@ module Net # :nodoc:
connect
end
if @seems_1_0_server
- req['connection'] = 'close'
+ req['connection'] ||= 'close'
end
if not req.response_body_permitted? and @close_on_empty_response
- req['connection'] = 'close'
+ req['connection'] ||= 'close'
end
- req['host'] = addr_port()
+ req['host'] ||= addr_port()
end
def end_transport(req, res)