summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-01-04 06:47:30 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-01-04 06:47:30 (GMT)
commit239a0429fdd8af2ff8a8a5fccbc19fe640d992b5 (patch)
tree9b505582c0b76dc16e5beb1f083e45b0a60806b6 /Lib/urllib/request.py
parent606e19dda3da637783e8b76b5919e0c57808bddd (diff)
parent6497aa3e00162752ebfae20e3e62a67e796d7630 (diff)
downloadcpython-239a0429fdd8af2ff8a8a5fccbc19fe640d992b5.zip
cpython-239a0429fdd8af2ff8a8a5fccbc19fe640d992b5.tar.gz
cpython-239a0429fdd8af2ff8a8a5fccbc19fe640d992b5.tar.bz2
merge from 3.2
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r--Lib/urllib/request.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 8bf15d8..2f74759 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -572,7 +572,7 @@ class HTTPRedirectHandler(BaseHandler):
# For security reasons we don't allow redirection to anything other
# than http, https or ftp.
- if urlparts.scheme not in ('http', 'https', 'ftp'):
+ if urlparts.scheme not in ('http', 'https', 'ftp', ''):
raise HTTPError(
newurl, code,
"%s - Redirection to url '%s' is not allowed" % (msg, newurl),
@@ -1963,7 +1963,7 @@ class FancyURLopener(URLopener):
# We are using newer HTTPError with older redirect_internal method
# This older method will get deprecated in 3.3
- if urlparts.scheme not in ('http', 'https', 'ftp'):
+ if urlparts.scheme not in ('http', 'https', 'ftp', ''):
raise HTTPError(newurl, errcode,
errmsg +
" Redirection to url '%s' is not allowed." % newurl,