Skip to content
Myr

Don't send the full URL on CONNECT messages.

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 9968a10 · Browse files · 1 file+5 added−4 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−4 removed

  • other:+5 added−4 removed

1 file+5 added−4 removed

modified:requests/adapters.py+5 added-4 removed
218 unmodified lines
219220 def request_url(self, request, proxies):221 """Obtain the url to use when making the final request.222223 If the message is being sent through a proxy, the full URL has to be224 used. Otherwise, we should only use the path portion of the URL.223 If the message is being sent through a HTTP proxy, the full URL has to224 be used. Otherwise, we should only use the path portion of the URL.225226 This should not be called from user code, and is only exposed for use227 when subclassing the228 :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
1 unmodified line
230 :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.231 :param proxies: A dictionary of schemes to proxy URLs.232 """233 proxies = proxies or {}234 scheme = urlparse(request.url).scheme.lower()234 proxy = proxies.get(urlparse(request.url).scheme)235 proxy = proxies.get(scheme)236236 if proxy:237 if proxy and scheme != 'https':238 url, _ = urldefrag(request.url)239 else:240 url = request.path_url241
129 unmodified lines