summaryrefslogtreecommitdiff
path: root/lib/net/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r--lib/net/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 2afe3873f1..b78c0ef9a5 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -889,7 +889,7 @@ module Net
if not req.response_body_permitted? and @close_on_empty_response then
req['connection'] = 'close'
end
- req['host'] = addr_port()
+ req['host'] ||= addr_port()
end
def end_transport( req, res )