]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #994595: Recognize Basic auth even if other schemes are offered.
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 3 Aug 2004 13:00:52 +0000 (13:00 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 3 Aug 2004 13:00:52 +0000 (13:00 +0000)
Lib/urllib2.py
Misc/NEWS

index d136485cd012480211eef97c960a62792feb111f..e45978ed14224a01970ffd8894ff09f9c903d08e 100644 (file)
@@ -631,7 +631,7 @@ class AbstractBasicAuthHandler:
         # XXX could be multiple headers
         authreq = headers.get(authreq, None)
         if authreq:
-            mo = AbstractBasicAuthHandler.rx.match(authreq)
+            mo = AbstractBasicAuthHandler.rx.search(authreq)
             if mo:
                 scheme, realm = mo.groups()
                 if scheme.lower() == 'basic':
index 033db637534c4a5e54e99b27ceca29ea08045919..df53b7682b1a09c18eab8a133795958b91d3b33b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -43,6 +43,9 @@ Extension modules
 Library
 -------
 
+- Patch #994595: urllib2 now recognizes Basic authentication even if
+  other authentication schemes are offered.
+
 - Bug #993394.  A KeyError was being raised by Thread.__delete() for
   dummy_threading when called by atexit if an instance of Thread was created in
   an interpreter running in -O.  The exception was of no importance and thus is