[issue6557] urllib.urlopen creates bad requests when location header of 301 redirects contain spaces
Francesco Del Degan
report at bugs.python.org
Mon Aug 3 18:51:17 CEST 2009
Francesco Del Degan <f.deldegan at ngi.it> added the comment:
urllib2 does escape spaces (and other characters too):
In [20]:
u=urllib2.urlopen("http://sourceforge.net/project/showfiles.php?
group_id=16847&package_id=13374")
In [21]: u.url
Out[21]: 'http://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-
c%20Super%20Stable/'
In [22]: u.read()[0:100]
Out[22]: '\n\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xh'
----------
nosy: +pr0gg3d
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6557>
_______________________________________
More information about the Python-bugs-list
mailing list