At file:///net/bigmamac/Volumes/home/vila/src/bzr/bugs/256612-http-auth/
------------------------------------------------------------
revno: 4053
revision-id: [email protected]
parent: [email protected]
committer: Vincent Ladeuil <[email protected]>
branch nick: 256612-http-auth
timestamp: Wed 2009-02-25 20:34:19 +0100
message:
Slight cosmetic tweaks.
=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py 2009-02-25 19:24:44
+0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py 2009-02-25 19:34:19
+0000
@@ -983,11 +983,13 @@
_max_retry = 3
"""We don't want to retry authenticating endlessly"""
+ requires_username = True
+ """Whether the auth mechanism requires a username."""
+
# The following attributes should be defined by daughter
# classes:
# - auth_required_header: the header received from the server
# - auth_header: the header sent in the request
- # - requires_username: whether the auth mechanism requires a username
def __init__(self):
# We want to know when we enter into an try/fail cycle of
@@ -1222,8 +1224,6 @@
auth_regexp = re.compile('realm="([^"]*)"', re.I)
- requires_username = True
-
def build_auth_header(self, auth, request):
raw = '%s:%s' % (auth['user'], auth['password'])
auth_header = 'Basic ' + raw.encode('base64').strip()
@@ -1277,11 +1277,9 @@
class DigestAuthHandler(AbstractAuthHandler):
"""A custom digest authentication handler."""
- # Before basic as digest is a bit more secure
+ # Before basic as digest is a bit more secure and should be preferred
handler_order = 490
- requires_username = True
-
def auth_params_reusable(self, auth):
# If the auth scheme is known, it means a previous
# authentication was successful, all information is
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits