[ python-Bugs-1353433 ] Http redirection error in urllib2.py
SourceForge.net
noreply at sourceforge.net
Wed Feb 1 21:28:33 CET 2006
Bugs item #1353433, was opened at 2005-11-10 20:25
Message generated for change (Comment added) made by jjlee
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1353433&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Dehn (dehn)
Assigned to: Nobody/Anonymous (nobody)
Summary: Http redirection error in urllib2.py
Initial Comment:
A url request returns a redirect that contains a space ' '
character. Python urllib2.py does not replace this
character with '%20' and fails.
Entering a line after line 507 of:
newurl=re.sub(' ','%20',newurl)
Corrects my problem.
----------------------------------------------------------------------
Comment By: John J Lee (jjlee)
Date: 2006-02-01 20:28
Message:
Logged In: YES
user_id=261020
The problem is more general, so perhaps:
URLQUOTE_SAFE_URL_CHARS = "!*'();:@&=+$,/?%#[]~"
newurl = urllib.quote(url, URLQUOTE_SAFE_URL_CHARS)
Caveat: I still haven't read RFCs 3986/3987...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1353433&group_id=5470
More information about the Python-bugs-list
mailing list