Skip to content
Myr

Cache manager for proxy connection.

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

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

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:requests/adapters.py+5 added-1 removed
69 unmodified lines
70 pool_maxsize=DEFAULT_POOLSIZE, max_retries=DEFAULT_RETRIES,71 pool_block=DEFAULT_POOLBLOCK):72 self.max_retries = max_retries73 self.config = {}74 self.proxy_manager = {}7576 super(HTTPAdapter, self).__init__()7778 self._pool_connections = pool_connections
115 unmodified lines
194 proxy = proxies.get(urlparse(url.lower()).scheme)195196 if proxy:197 except_on_missing_scheme(proxy)198 if not proxy in self.proxy_manager:199 self.proxy_manager[proxy] = proxy_from_url(proxy)200197 conn = proxy_from_url(proxy).connection_from_url(url)201 conn = self.proxy_manager[proxy].connection_from_url(url)202 else:203 conn = self.poolmanager.connection_from_url(url.lower())204205 return conn
141 unmodified lines