mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
Bump up net-http 0.3.0
This commit is contained in:
parent
8bce7c1a72
commit
f08dee67dc
12 changed files with 858 additions and 296 deletions
|
@ -15,7 +15,8 @@ class Net::HTTPGenericRequest
|
|||
|
||||
if URI === uri_or_path then
|
||||
raise ArgumentError, "not an HTTP URI" unless URI::HTTP === uri_or_path
|
||||
raise ArgumentError, "no host component for URI" unless uri_or_path.hostname
|
||||
hostname = uri_or_path.hostname
|
||||
raise ArgumentError, "no host component for URI" unless (hostname && hostname.length > 0)
|
||||
@uri = uri_or_path.dup
|
||||
host = @uri.hostname.dup
|
||||
host << ":".freeze << @uri.port.to_s if @uri.port != @uri.default_port
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue