From: Martin v. Löwis Date: Tue, 3 Aug 2004 12:59:55 +0000 (+0000) Subject: Patch #994595: Recognize Basic auth even if other schemes are offered. X-Git-Tag: v2.4a2~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65a7975f16f92f0e715a16b807f732c0d7a34bf0;p=python Patch #994595: Recognize Basic auth even if other schemes are offered. Will backport to 2.3. --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 8d38749f72..c525f8ca23 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -714,7 +714,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': diff --git a/Misc/NEWS b/Misc/NEWS index edd5989650..291cc77229 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -72,6 +72,9 @@ Extension modules Library ------- +- urllib2 now recognizes Basic authentication even if other authentication + schemes are offered. + - Bug #1001053. wave.open() now accepts unicode filenames. - gzip.GzipFile has a new fileno() method, to retrieve the handle of the