summaryrefslogtreecommitdiff
path: root/lib/net/http/generic_request.rb
diff options
context:
space:
mode:
-rw-r--r--lib/net/http/generic_request.rb33
1 files changed, 23 insertions, 10 deletions
@@ -136,21 +136,34 @@ class Net::HTTPGenericRequest
end
end
- def update_uri(host, port, ssl) # :nodoc:
return unless @uri
- @uri.host ||= host
- @uri.port = port
-
- scheme = ssl ? 'https' : 'http'
# convert the class of the URI
- unless scheme == @uri.scheme then
- new_uri = @uri.to_s.sub(/^https?/, scheme)
- @uri = URI new_uri
end
-
- @uri
end
private