diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-05 19:10:05 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-05 19:10:05 +0000 |
commit | c1652035644c5f52cd91cfb264df5072445f4020 (patch) | |
tree | 4380446ef46174c9a75842bdfe0505102dec4894 /lib/net/http.rb | |
parent | 159fa373f8e913a5464ab88c308e4375c946af8b (diff) | |
download | ruby-c1652035644c5f52cd91cfb264df5072445f4020.tar.gz |
* lib/net/http/generic_request.rb
(Net::HTTP::GenericRequest#update_uri):
handle scheme, host, and port to reflect connection to @uri.
* lib/net/http.rb (Net::HTTP#begin_transport): move trivial handling
to Net::HTTP::GenericRequest#update_uri.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r-- | lib/net/http.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index efa7313b40..eaf2cf4add 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1455,10 +1455,7 @@ module Net #:nodoc: req['connection'] ||= 'close' end - host = req['host'] || address - host = $1 if host =~ /(.*):\d+$/ - req.update_uri host, port, use_ssl? - + req.update_uri address, port, use_ssl? req['host'] ||= addr_port() end |