Skip to content
Myr

Help @sigmavirus24 with code golf.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Cory Benfield · parent 11b9b24 · Browse files · 1 file+7 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−8 removed

  • other:+7 added−8 removed

1 file+7 added−8 removed

modified:requests/adapters.py+7 added-8 removed
301 unmodified lines
302 :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.303 """304 proxy = select_proxy(request.url, proxies)305 scheme = urlparse(request.url).scheme306 proxy_scheme = ''306307 is_proxied_http_request = (proxy and scheme != 'https')308 using_socks_proxy = False309 if proxy:308 proxy_scheme = urlparse(proxy).scheme310 proxy_scheme = urlparse(proxy).scheme.lower()311 using_socks_proxy = proxy_scheme.startswith('socks')312310 if proxy and proxy_scheme.lower().startswith('socks'):311 # Socks proxies behave like the proxy isn't there at all.312 url = request.path_url313 elif proxy and scheme != 'https':313 url = request.path_url314 if is_proxied_http_request and not using_socks_proxy:315 url = urldefragauth(request.url)315 else:316 url = request.path_url316317 return url318319 def add_headers(self, request, **kwargs):
159 unmodified lines