summaryrefslogtreecommitdiff
path: root/lib
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
commita4e80a024dfb453b7d642a4d5263f3170e2a0490 (patch)
tree292477a94e36da409b5d75087bd60225540aac7c /lib
parent500e181e2013c87e449ffef49f34415d433d1f63 (diff)
* lib/net/http.rb (begin_transport): should not overwrite HTTP request header. [ruby-list:39543]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-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 0b7e20633b..8280c6a039 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)