diff options
| author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-13 10:54:41 +0000 |
|---|---|---|
| committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-13 10:54:41 +0000 |
| commit | ec46200dff1a2a3e1800f018325a70d516dcceb5 (patch) | |
| tree | 8bd5e10624d633f1406b2edf06bdbb050a0ec0bd /lib/net | |
| parent | 2305cecda567345726440311f035e59ca2ccda01 (diff) | |
| download | ruby-ec46200dff1a2a3e1800f018325a70d516dcceb5.tar.gz ruby-ec46200dff1a2a3e1800f018325a70d516dcceb5.tar.xz ruby-ec46200dff1a2a3e1800f018325a70d516dcceb5.zip | |
* lib/net/http.rb: should not overwrite HTTP request header. [ruby-list:39543]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
| -rw-r--r-- | lib/net/http.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 194389438..02cbaeb30 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -819,7 +819,7 @@ module Net # :nodoc: def request(req, body = nil, &block) # :yield: +response+ unless started? start { - req['connection'] = 'close' + req['connection'] ||= 'close' return request(req, body, &block) } end @@ -848,12 +848,12 @@ module Net # :nodoc: on_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) |
