mirror of
https://github.com/kennethreitz/requests3.git
synced 2026-06-05 23:10:16 +00:00
Use url parsing to check the scheme
This commit is contained in:
@@ -275,7 +275,8 @@ class HTTPAdapter(BaseAdapter):
|
||||
:param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.
|
||||
"""
|
||||
proxy = select_proxy(request.url, proxies)
|
||||
if proxy and not request.url.lower().startswith('https'):
|
||||
scheme = urlparse(request.url.lower()).scheme
|
||||
if proxy and scheme != 'https':
|
||||
url = urldefragauth(request.url)
|
||||
else:
|
||||
url = request.path_url
|
||||
|
||||
Reference in New Issue
Block a user