mirror of
https://github.com/lostisland/faraday.git
synced 2025-08-29 00:03:58 -04:00
fix HTTPS requests should go to port 443 if none specified
This commit is contained in:
parent
41afcc86e7
commit
7d277ef563
@ -41,7 +41,7 @@ module Faraday
|
||||
uri = Addressable::URI.parse(proxy[:uri])
|
||||
options[:proxy] = {
|
||||
:host => uri.host,
|
||||
:port => uri.port
|
||||
:port => uri.inferred_port
|
||||
}
|
||||
if proxy[:username] && proxy[:password]
|
||||
options[:proxy][:authorization] = [proxy[:username], proxy[:password]]
|
||||
|
@ -13,7 +13,7 @@ module Faraday
|
||||
url = env[:url]
|
||||
req = env[:request]
|
||||
|
||||
http = net_http_class(env).new(url.host, url.port)
|
||||
http = net_http_class(env).new(url.host, url.inferred_port)
|
||||
|
||||
if http.use_ssl = (url.scheme == 'https' && env[:ssl])
|
||||
ssl = env[:ssl]
|
||||
|
Loading…
x
Reference in New Issue
Block a user