Skip to content
Myr

Fix for new proxy API.

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

authored by ms4py · committed by schlamar · parent d06daba · Browse files · 1 file+2 added−2 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−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/adapters.py+2 added-2 removed
9 unmodified lines
1011import socket1213from .models import Response14from .packages.urllib3.poolmanager import PoolManager, ProxyManager14from .packages.urllib3.poolmanager import PoolManager, proxy_from_url15from .packages.urllib3.response import HTTPResponse16from .compat import urlparse, basestring, urldefrag, unquote17from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,18 except_on_missing_scheme, get_auth_from_url)
174 unmodified lines
193 proxy = proxies.get(urlparse(url.lower()).scheme)194195 if proxy:196 except_on_missing_scheme(proxy)197 conn = ProxyManager(self.poolmanager.connection_from_url(proxy))197 conn = proxy_from_url(proxy).connection_from_url(url)198 else:199 conn = self.poolmanager.connection_from_url(url.lower())200201 return conn
141 unmodified lines