~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_urllib2_wrappers.py

  • Committer: Vincent Ladeuil
  • Date: 2007-04-21 21:29:34 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-20070421212934-y3gyvd9pgs19sr7u
Cometic changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
And a custom Request class that lets us track redirections, and
32
32
handle authentication schemes.
33
 
 
34
 
We also create a Request hierarchy, to make it clear what type of
35
 
request is being made.
36
33
"""
37
34
 
38
35
DEBUG = 0
149
146
 
150
147
    The Request object tracks:
151
148
    - the connection the request will be made on.
152
 
 
153
149
    - the authentication parameters needed to preventively set
154
150
      the authentication header once a first authentication have
155
151
       been made.
725
721
            # No proxy auth parameter are available, we are
726
722
            # handling the first proxied request, intialize.
727
723
            # scheme and realm will be set by the AuthHandler
728
 
            # We default to a realm of None to catch them all.
729
724
            authuri = extract_authentication_uri(proxy)
730
725
            request.proxy_auth = {'user': user, 'password': password,
731
726
                                  'authuri': authuri}
732
727
            if user and password is not None: # '' is a valid password
 
728
                # We default to a realm of None to catch them all.
733
729
                self.password_manager.add_password(None, authuri,
734
730
                                                   user, password)
735
731
        orig_type = request.get_type()