summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-08 16:07:54 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-08 16:07:54 +0000
commit0f7b26ab4e2922e767d730084cc29f713e05d126 ()
treebf2ed891adbbcf472ea49ef24bc26d13508b1acc /lib
parent897af5dfcdc13bc98d2372097a53483d712c8d45 (diff)
Raise ArgumentError if host component is nil
From: oss92 <[email protected]> fix https://.com/ruby/ruby/pull/1278 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/net/http/generic_request.rb2
1 files changed, 2 insertions, 0 deletions
@@ -14,6 +14,8 @@ class Net::HTTPGenericRequest
@response_has_body = resbody
if URI === uri_or_path then
@uri = uri_or_path.dup
host = @uri.hostname.dup
host << ":".freeze << @uri.port.to_s if @uri.port != @uri.default_port