Home | History | Annotate | Download | only in Lib

Lines Matching refs:Proxy

663 def _parse_proxy(proxy):
672 ValueError: proxy URL with no authority: 'file:/ftp.example.com/'
678 >>> _parse_proxy('proxy.example.com')
679 (None, None, None, 'proxy.example.com')
680 >>> _parse_proxy('proxy.example.com:3128')
681 (None, None, None, 'proxy.example.com:3128')
686 >>> _parse_proxy('joe:password@proxy.example.com')
687 (None, 'joe', 'password', 'proxy.example.com')
688 >>> _parse_proxy('joe:password@proxy.example.com:3128')
689 (None, 'joe', 'password', 'proxy.example.com:3128')
693 >>> _parse_proxy('http://proxy.example.com/')
694 ('http', None, None, 'proxy.example.com')
695 >>> _parse_proxy('http://proxy.example.com:3128/')
696 ('http', None, None, 'proxy.example.com:3128')
697 >>> _parse_proxy('http://joe:password@proxy.example.com/')
698 ('http', 'joe', 'password', 'proxy.example.com')
699 >>> _parse_proxy('http://joe:password@proxy.example.com:3128')
700 ('http', 'joe', 'password', 'proxy.example.com:3128')
704 >>> _parse_proxy('ftp://joe:password@proxy.example.com/rubbish:3128')
705 ('ftp', 'joe', 'password', 'proxy.example.com')
709 >>> _parse_proxy('http://joe:password@proxy.example.com')
710 ('http', 'joe', 'password', 'proxy.example.com')
713 scheme, r_scheme = splittype(proxy)
717 authority = proxy
721 raise ValueError("proxy URL with no authority: %r" % proxy)
746 lambda r, proxy=url, type=type, meth=self.proxy_open: \
747 meth(r, proxy, type))
749 def proxy_open(self, req, proxy, type):
751 proxy_type, user, password, hostport = _parse_proxy(proxy)
762 req.add_header('Proxy-authorization', 'Basic ' + creds)
771 # grok the proxy's URL type
773 # {'http': 'ftp://proxy.example.com'}, we may end up turning
775 # ftp://proxy.example.com/a
915 auth_header = 'Proxy-authorization'
923 response = self.http_error_auth_reqed('proxy-authenticate',
1105 auth_header = 'Proxy-Authorization'
1110 retry = self.http_error_auth_reqed('proxy-authenticate',
1186 proxy_auth_hdr = "Proxy-Authorization"
1189 # Proxy-Authorization should not be sent to origin