Home | History | Annotate | Download | only in python2.7

Lines Matching refs:Proxy

638 def _parse_proxy(proxy):
647 ValueError: proxy URL with no authority: 'file:/ftp.example.com/'
653 >>> _parse_proxy('proxy.example.com')
654 (None, None, None, 'proxy.example.com')
655 >>> _parse_proxy('proxy.example.com:3128')
656 (None, None, None, 'proxy.example.com:3128')
661 >>> _parse_proxy('joe:password@proxy.example.com')
662 (None, 'joe', 'password', 'proxy.example.com')
663 >>> _parse_proxy('joe:password@proxy.example.com:3128')
664 (None, 'joe', 'password', 'proxy.example.com:3128')
668 >>> _parse_proxy('http://proxy.example.com/')
669 ('http', None, None, 'proxy.example.com')
670 >>> _parse_proxy('http://proxy.example.com:3128/')
671 ('http', None, None, 'proxy.example.com:3128')
672 >>> _parse_proxy('http://joe:password@proxy.example.com/')
673 ('http', 'joe', 'password', 'proxy.example.com')
674 >>> _parse_proxy('http://joe:password@proxy.example.com:3128')
675 ('http', 'joe', 'password', 'proxy.example.com:3128')
679 >>> _parse_proxy('ftp://joe:password@proxy.example.com/rubbish:3128')
680 ('ftp', 'joe', 'password', 'proxy.example.com')
684 >>> _parse_proxy('http://joe:password@proxy.example.com')
685 ('http', 'joe', 'password', 'proxy.example.com')
688 scheme, r_scheme = splittype(proxy)
692 authority = proxy
696 raise ValueError("proxy URL with no authority: %r" % proxy)
721 lambda r, proxy=url, type=type, meth=self.proxy_open: \
722 meth(r, proxy, type))
724 def proxy_open(self, req, proxy, type):
726 proxy_type, user, password, hostport = _parse_proxy(proxy)
737 req.add_header('Proxy-authorization', 'Basic ' + creds)
746 # grok the proxy's URL type
748 # {'http': 'ftp://proxy.example.com'}, we may end up turning
750 # ftp://proxy.example.com/a
904 auth_header = 'Proxy-authorization'
912 response = self.http_error_auth_reqed('proxy-authenticate',
1092 auth_header = 'Proxy-Authorization'
1097 retry = self.http_error_auth_reqed('proxy-authenticate',
1172 proxy_auth_hdr = "Proxy-Authorization"
1175 # Proxy-Authorization should not be sent to origin