Rev 2550: (Vincent Ladeuil) Fix bug #121889 by working around urllib2 limitation. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Jun 25 18:46:55 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2550
revision-id: pqm at pqm.ubuntu.com-20070625174647-pocypsjmp861qgv7
parent: pqm at pqm.ubuntu.com-20070625151932-yshsnfirhwggx07b
parent: john at arbash-meinel.com-20070625165906-rj1g8amflmksb95i
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-06-25 18:46:47 +0100
message:
(Vincent Ladeuil) Fix bug #121889 by working around urllib2 limitation.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/HTTPTestUtil.py HTTPTestUtil.py-20050914180604-247d3aafb7a43343
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
------------------------------------------------------------
revno: 2547.2.1
merged: john at arbash-meinel.com-20070625165906-rj1g8amflmksb95i
parent: pqm at pqm.ubuntu.com-20070625092303-yr8bqbke8snrmkig
parent: v.ladeuil+lp at free.fr-20070624152356-2z0c3j94udya3mge
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Mon 2007-06-25 11:59:06 -0500
message:
(Vincent Ladeuil) Fix bug #121889 by working around urllib2 limitation.
------------------------------------------------------------
revno: 2545.2.2
merged: v.ladeuil+lp at free.fr-20070624152356-2z0c3j94udya3mge
parent: v.ladeuil+lp at free.fr-20070624151640-5tg62jb5g9tqvybd
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 121889
timestamp: Sun 2007-06-24 17:23:56 +0200
message:
Update NEWS.
------------------------------------------------------------
revno: 2545.2.1
merged: v.ladeuil+lp at free.fr-20070624151640-5tg62jb5g9tqvybd
parent: pqm at pqm.ubuntu.com-20070622160825-17gv0lorkzbr3x76
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 121889
timestamp: Sun 2007-06-24 17:16:40 +0200
message:
Fix 121889 by working around urllib2 bug.
* tests/HTTPTestUtil.py:
(DigestAuthRequestHandler.send_header_auth_reqed): python-2.4.1
fail to decode the header without the quotes. The RFC do not
require them, python >= 2.4.4 handles them gracefully. Not a big
deal.
* tests/test_http.py:
(TestAuth.setUp): Add a comment in hope I will not running around
shouting: "Who takes my traces ? Gimme my traces !" when running
the only tests who capture their own traces without showing them.
* transport/http/_urllib2_wrappers.py (BasicAuthHandler,
DigestAuthHandler): Not directly related to the bug, bug good to
fix anyway, the digest auth should be preferred to the basic
one. To do so, the digest handler should be tried before the basic
one.
* builtins.py:
(cmd_selftest.run): Fix typo. Note to reviewers: No, it's not
related to the bug. No there are no tests for that. No I don't
intend to write some :) But I'll understand if you veto that
because you want to take care of it :D
=== modified file 'NEWS'
--- a/NEWS 2007-06-25 14:27:08 +0000
+++ b/NEWS 2007-06-25 17:46:47 +0000
@@ -57,6 +57,12 @@
running the test suite and cuts the time by about half.
(Andrew Bennetts, Martin Pool)
+ BUGFIXES:
+
+ * Work around python-2.4.1 inhability to correctly parse the
+ authentication header.
+ (Vincent Ladeuil, #121889)
+
bzr 0.17 2007-06-18
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-06-25 13:17:32 +0000
+++ b/bzrlib/builtins.py 2007-06-25 17:46:47 +0000
@@ -2472,9 +2472,9 @@
clean_selftest_output()
return 0
if keep_output:
- trace.warning("notice: selftest --keep-output "
- "is no longer supported; "
- "test output is always removed")
+ warning("notice: selftest --keep-output "
+ "is no longer supported; "
+ "test output is always removed")
if numbered_dirs is None and sys.platform == 'win32':
numbered_dirs = True
=== modified file 'bzrlib/tests/HTTPTestUtil.py'
--- a/bzrlib/tests/HTTPTestUtil.py 2007-05-06 06:59:57 +0000
+++ b/bzrlib/tests/HTTPTestUtil.py 2007-06-24 15:16:40 +0000
@@ -393,7 +393,8 @@
def send_header_auth_reqed(self):
tcs = self.server.test_case_server
header = 'Digest realm="%s", ' % tcs.auth_realm
- header += 'nonce="%s", algorithm=%s, qop=auth' % (tcs.auth_nonce, 'MD5')
+ header += 'nonce="%s", algorithm="%s", qop="auth"' % (tcs.auth_nonce,
+ 'MD5')
self.send_header(tcs.auth_header_sent,header)
=== modified file 'bzrlib/tests/test_http.py'
--- a/bzrlib/tests/test_http.py 2007-05-06 06:59:57 +0000
+++ b/bzrlib/tests/test_http.py 2007-06-24 15:16:40 +0000
@@ -1176,6 +1176,10 @@
self.build_tree_contents([('a', 'contents of a\n'),
('b', 'contents of b\n'),])
self.old_factory = ui.ui_factory
+ # The following has the unfortunate side-effect of hiding any ouput
+ # during the tests (including pdb prompts). Feel free to comment them
+ # for debugging purposes but leave them in place, there are needed to
+ # run the tests without any console
self.old_stdout = sys.stdout
sys.stdout = StringIOWrapper()
self.addCleanup(self.restoreUIFactory)
=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py 2007-04-22 16:32:04 +0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py 2007-06-24 15:16:40 +0000
@@ -916,6 +916,8 @@
class BasicAuthHandler(AbstractAuthHandler):
"""A custom basic authentication handler."""
+ handler_order = 500
+
auth_regexp = re.compile('realm="([^"]*)"', re.I)
def build_auth_header(self, auth, request):
@@ -972,6 +974,9 @@
class DigestAuthHandler(AbstractAuthHandler):
"""A custom digest authentication handler."""
+ # Before basic as digest is a bit more secure
+ handler_order = 490
+
def auth_params_reusable(self, auth):
# If the auth scheme is known, it means a previous
# authentication was successful, all information is
More information about the bazaar-commits
mailing list