diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/http.rb | 6 |
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) |