~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
..
bzrlib 1185.1.29 19 years ago Robert Collins merge merge tweaks from aaron, which includes late Diff
contrib 1185.1.29 19 years ago Robert Collins merge merge tweaks from aaron, which includes late Diff
doc 1185.1.29 19 years ago Robert Collins merge merge tweaks from aaron, which includes late Diff
tools 1185.1.29 19 years ago Robert Collins merge merge tweaks from aaron, which includes late Diff
.bzrignore 2054.2.15 18 years ago Aaron Bentley Ignore html docs (both kinds) 540 bytes Diff Download File
.rsyncexclude 1185.33.36 18 years ago Martin Pool Exclude more files from dumb-rsync upload 203 bytes Diff Download File
BRANCH.TODO 2363.4.5 17 years ago Vincent Ladeuil Add white box tests for basic HTTP auth. * bzrlib 233 bytes Diff Download File
build-api 1185.33.32 18 years ago Martin Pool [merge] fix \t in commit messages 100 bytes Diff Download File
File bzr 2389.1.1 17 years ago Martin Pool Merge 0.15 final release back to trunk, including: 3.8 KB Diff Download File
bzr.ico 1861.2.16 18 years ago Alexander Belchenko new official bzr.ico 7.2 KB Diff Download File
COPYING.txt 1861.2.9 18 years ago Alexander Belchenko rename gpl.txt => COPYING.txt 17.5 KB Diff Download File
File generate_docs.py 1861.2.7 18 years ago Alexander Belchenko merge bzr.dev 2.9 KB Diff Download File
HACKING 2370.1.1 17 years ago Ian Clatworthy Minor corrections to HACKING 25 KB Diff Download File
INSTALL 2382.2.6 17 years ago Martin Pool Recommendation to delete bzrlib when installing 675 bytes Diff Download File
Makefile 2245.4.5 17 years ago Alexander Belchenko bzr-win32-bdist-postinstall.py: good win98 support 3.1 KB Diff Download File
NEWS 2363.4.9 17 years ago Vincent Ladeuil Catch first succesful authentification to avoid fu 109 KB Diff Download File
profile_imports.py 1996.3.36 18 years ago John Arbash Meinel [merge] bzr.dev 2070 5.4 KB Diff Download File
README 2367.1.1 17 years ago Robert Collins Update NEWS to match bzr 0.15. 2.4 KB Diff Download File
setup.py 2245.4.4 17 years ago Alexander Belchenko setup.py: fix plain 'python setup.py install' for 7 KB Diff Download File
TODO 2382.2.5 17 years ago Martin Pool Contents of TODO file moved into bug tracker 115 bytes Diff Download File