From: Neal Norwitz Date: Wed, 9 Oct 2002 23:17:04 +0000 (+0000) Subject: SF #614596, fix for urllib2.AbstractBasicAuthHandler, John Williams (johnw42) X-Git-Tag: v2.3c1~3840 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=853ddd5cb96981966b935ed75bf8af0cfd0bee24;p=python SF #614596, fix for urllib2.AbstractBasicAuthHandler, John Williams (johnw42) Make the regex case insensitive for some web sites which use Realm. --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 031f0246d3..2b01e8cb7f 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -572,7 +572,7 @@ class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr): class AbstractBasicAuthHandler: - rx = re.compile('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"') + rx = re.compile('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', re.I) # XXX there can actually be multiple auth-schemes in a # www-authenticate header. should probably be a lot more careful