Skip to content
Myr

no_proxy support

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

authored by Mher Movsisyan · committed by Mher Movsisyan · parent de1637c · Browse files · 1 file+3 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+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:requests/models.py+3 added-1 removed
7 unmodified lines
8"""910import json11import os12import string13from datetime import datetime1415from .hooks import dispatch_hook, HOOKS16from .structures import CaseInsensitiveDict
504 unmodified lines
521 if (content_type) and (not 'content-type' in self.headers):522 self.headers['Content-Type'] = content_type523524 _p = urlparse(url)525 no_proxy = filter(string.strip, self.proxies.get('no', '').split(','))526 proxy = self.proxies.get(_p.scheme)527526 if proxy:528 if proxy and not any(map(_p.netloc.endswith, no_proxy)):529 conn = poolmanager.proxy_from_url(proxy)530 _proxy = urlparse(proxy)531 if '@' in _proxy.netloc:532 auth, url = _proxy.netloc.split('@', 1)
305 unmodified lines