Skip to content
Myr

Fix another place the proxy-selecting logic is used.

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

authored by Jason Grout · committed by Jason Grout · parent 22075f0 · Browse files · 1 file+5 added−3 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+5 added−3 removed

  • other:+5 added−3 removed

1 file+5 added−3 removed

modified:requests/adapters.py+5 added-3 removed
276 unmodified lines
277 :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.278 :param proxies: A dictionary of schemes to proxy URLs.279 """280 proxies = proxies or {}281 scheme = urlparse(request.url).scheme282 proxy = proxies.get(scheme)281 urlparts = urlparse(request.url.lower())282 proxy = proxies.get(urlparts.scheme+'://'+urlparts.hostname)283 if proxy is None:284 proxy = proxies.get(urlparts.scheme)285284 if proxy and scheme != 'https':286 if proxy and urlparts.scheme != 'https':287 url = urldefragauth(request.url)288 else:289 url = request.path_url290
149 unmodified lines