~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 2420.1.16.

  • Committer: Vincent Ladeuil
  • Date: 2007-04-22 16:32:04 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-20070422163204-7iksk91jy9091nex
Handle nonce changes. Fix a nasty bug breaking the auth parameters sharing.

* bzrlib/tests/HTTPTestUtil.py:
(DigestAuthServer.digest_authorized): Check the nonce validity.

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib._perform): Always update auth parameters
after a request processing, they could change at any moment.

* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler.update_auth): New method to track auth
modifications that should be lead to new authentications.
(AbstractAuthHandler.auth_required): Do not copy the auth
parameters but track the changes instead (copying breaks the auth
parameters sharing between cloned transports). Do not restrict the
auth 'identity' to be (user, realm, password) only.
(AbstractAuthHandler.auth_match): Document the auth parameter
update policy that MUST be respected to avoid retrying to
authenticate with wrong parameters, endlessly.
(AbstractAuthHandler.auth_successful): Not used anymore, but kept
in place if we ever want to handle the 'Authorization-Info' header.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: