~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 2420.1.3.

  • Committer: Vincent Ladeuil
  • Date: 2007-04-17 22:07:18 UTC
  • mto: (2420.1.21 bzr.http.auth)
  • mto: This revision was merged to the branch mainline in revision 2463.
  • Revision ID: v.ladeuil+lp@free.fr-20070417220718-kce3mj0wn8hi8m02
Implement http proxy basic authentication.

* bzrlib/transport/http/_urllib2_wrappers.py:
(Request.set_proxy_auth): New method.
(extract_credentials): Moved from
HttpTransport_urllib._extract_auth.
(ProxyHandler.__init__): We need a password_manager for
authentication.
(ProxyHandler.set_proxy): Don't add the auth header, the
ProxyHandlers will do it later.
(ProxyBasicAuthHandler): New class. Handle the http basic
authentication for proxy.
(Opener.__init__): Enable ProxyBasicAuthHandler.

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib._extract_auth): Moved to
_urllib2_wrappers.extract_credentials.

* bzrlib/tests/test_http.py:
(TestHttpProxyWhiteBox.test_empty_pass,
TestHttpProxyWhiteBox.test_user_pass): Deleted. Euivalent tests
exists in TestHTTPProxyBasicAuth now.

* bzrlib/tests/HTTPTestUtil.py:
(BasicAuthRequestHandler): Fix inheritance.
(ProxyBasicAuthRequestHandler): Force the use of
FakeProxyRequestHandler.translate_path. This is a bit ugly :-/

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: