mirror of
https://github.com/lostisland/faraday.git
synced 2025-08-29 00:03:58 -04:00
Prefer #hostname over #host. (#714)
This commit is contained in:
parent
d18cc04be5
commit
923f90558c
@ -87,10 +87,10 @@ module Faraday
|
||||
|
||||
def net_http_connection(env)
|
||||
if proxy = env[:request][:proxy]
|
||||
Net::HTTP::Proxy(proxy[:uri].host, proxy[:uri].port, proxy[:user], proxy[:password])
|
||||
Net::HTTP::Proxy(proxy[:uri].hostname, proxy[:uri].port, proxy[:user], proxy[:password])
|
||||
else
|
||||
Net::HTTP
|
||||
end.new(env[:url].host, env[:url].port || (env[:url].scheme == 'https' ? 443 : 80))
|
||||
end.new(env[:url].hostname, env[:url].port || (env[:url].scheme == 'https' ? 443 : 80))
|
||||
end
|
||||
|
||||
def configure_ssl(http, ssl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user