From a4e80a024dfb453b7d642a4d5263f3170e2a0490 Mon Sep 17 00:00:00 2001 From: aamine Date: Tue, 13 Apr 2004 08:55:55 +0000 Subject: * 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 --- lib/net/http.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/net/http.rb') 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) -- cgit v1.2.3