~bzr-pqm/bzr/bzr.dev

  • Committer: Vincent Ladeuil
  • Date: 2007-04-13 12:17:40 UTC
  • mto: (2420.1.1 bzr.http.auth)
  • Revision ID: v.ladeuil+lp@free.fr-20070413121740-mnwzf1656e31aenj
Catch first succesful authentification to avoid further 401
roudtrips in hhtp urllib implementation.

* bzrlib/transport/http/_urllib2_wrappers.py:
(Request.__init__): Initialize auth parameters.
(Request.extract_auth): Moved to
HttpTransport_urllib._extract_auth.
(Request.set_auth): New method.
(PasswordManager): Now that the transport handles the auth
parameters, we can use transport.base as the auth uri and work
around the python-2.4 bug.
(HTTPBasicAuthHandler.http_error_401): Capture the auth scheme
when the authentication succeeds.

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): Extract authentication at
construction time so that we don't have to do it at request build
time. urllib2 will be happier without it.
(HttpTransport_urllib._extract_auth): Moved from
_urllib2_wrappers.Request.extract_auth.
(HttpTransport_urllib._ask_password): Made private and do not
require a 'request' parameter anymore.
(HttpTransport_urllib._perform): The transport is now responsible
for handling the auth parameters and provide them to the
requests. And from there we can avoid the 401 roundtrips
yeaaaaah! (Except the first one of course to determine the auth
scheme).
Filename Latest Rev Last Changed Committer Comment Size
..
bazaar-vcs.org.kid 2054.2.16 18 years ago Aaron Bentley More updates from review comments 18.3 KB Diff Download File
centralized_workflow.txt 2293.1.6 17 years ago Brad Crittenden post review changes 11.8 KB Diff Download File
configuration.txt 2293.1.6 17 years ago Brad Crittenden post review changes 6.6 KB Diff Download File
default.css 1551.8.18 18 years ago Aaron Bentley Tweak font settings in stylesheet 1.7 KB Diff Download File
http_smart_server.txt 2293.1.6 17 years ago Brad Crittenden post review changes 7 KB Diff Download File
index.txt 2293.1.6 17 years ago Brad Crittenden post review changes 1.5 KB Diff Download File
plugins.txt 2293.1.6 17 years ago Brad Crittenden post review changes 3.1 KB Diff Download File
README.1st 1861.2.6 18 years ago Alexander Belchenko branding: change Bazaar-NG to Bazaar 904 bytes Diff Download File
server.txt 2293.1.6 17 years ago Brad Crittenden post review changes 2.7 KB Diff Download File
setting_up_email.txt 2293.1.7 17 years ago Aaron Bentley Fix heading formatting 3.8 KB Diff Download File
specifying_revisions.txt 2293.1.6 17 years ago Brad Crittenden post review changes 4.3 KB Diff Download File
tutorial.txt 2393.1.1 17 years ago Elliot Murphy Use double quotes instead of single quotes for bzr 20.1 KB Diff Download File
using_aliases.txt 2293.1.6 17 years ago Brad Crittenden post review changes 2.1 KB Diff Download File
version_info.txt 2293.1.5 17 years ago Brad Crittenden Merge from my LP branch 1.9 KB Diff Download File