We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9274a1 commit 9533812Copy full SHA for 9533812
lib/net/http/generic_request.rb
@@ -23,7 +23,7 @@ def initialize(m, reqbody, resbody, uri_or_path, initheader = nil) # :nodoc:
23
raise ArgumentError, "no host component for URI" unless (hostname && hostname.length > 0)
24
@uri = uri_or_path.dup
25
@host = @uri.host.dup
26
- @port = @uri.port if @uri.port != @uri.default_port
+ @port = @uri.port == @uri.default_port ? nil : @uri.port
27
@path = uri_or_path.request_uri
28
raise ArgumentError, "no HTTP request path given" unless @path
29
else
0 commit comments