summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-05-15 14:39:17 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-05-15 14:39:17 (GMT)
commitb26fe2f313143139f7666f125b097d9c92a494ff (patch)
tree42d106f0aa42551995255ba09bc97286f81cf8e4 /Lib/urllib/request.py
parent0fb41b56ea1415943569ee6dda1c9d1aec952c37 (diff)
parent34f3fcc269be2ecded57ff3ae336977c5e74c42f (diff)
downloadcpython-b26fe2f313143139f7666f125b097d9c92a494ff.zip
cpython-b26fe2f313143139f7666f125b097d9c92a494ff.tar.gz
cpython-b26fe2f313143139f7666f125b097d9c92a494ff.tar.bz2
merge from 3.2 - Issue #12541: Be lenient with quotes around Realm field of HTTP Basic Authentation in urllib2.
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r--Lib/urllib/request.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index a5f0866..6cc78ed 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -895,7 +895,7 @@ class AbstractBasicAuthHandler:
# allow for double- and single-quoted realm values
# (single quotes are a violation of the RFC, but appear in the wild)
rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+'
- 'realm=(["\'])(.*?)\\2', re.I)
+ 'realm=(["\']?)([^"\']*)\\2', re.I)
# XXX could pre-emptively send auth info already accepted (RFC 2617,
# end of section 2, and section 1.2 immediately after "credentials"