Skip to content
Myr

Use url parsing to check the scheme

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 fb496e4 · Browse files · 1 file+2 added−1 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+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:requests/adapters.py+2 added-1 removed
273 unmodified lines
274 :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.275 :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.276 """277 proxy = select_proxy(request.url, proxies)278 if proxy and not request.url.lower().startswith('https'):278 scheme = urlparse(request.url.lower()).scheme279 if proxy and scheme != 'https':280 url = urldefragauth(request.url)281 else:282 url = request.path_url283
149 unmodified lines