diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/net/http.rb | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Tue Apr 13 17:55:16 2004 Minero Aoki <aamine@loveruby.net> + + * lib/net/http.rb (begin_transport): should not overwrite HTTP + request header. [ruby-list:39543] + Tue Apr 13 16:48:00 2004 Minero Aoki <aamine@loveruby.net> * lib/net/pop.rb: merge POP3S patch. This patch is contributed by 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) |