Olemis Lang <ole...@gmail.com> added the comment: Ooops ... sorry, remove the print statement. The patch is as follows :
{{{ #!diff --- /usr/lib/python2.5/urllib.py 2008-07-31 13:40:40.000000000 -0500 +++ /media/urllib_unix.py 2009-01-26 09:48:54.000000000 -0500 @@ -270,6 +270,7 @@ def open_http(self, url, data=None): """Use HTTP protocol.""" import httplib + from urlparse import urlparse user_passwd = None proxy_passwd= None if isinstance(url, str): @@ -312,12 +313,17 @@ else: auth = None h = httplib.HTTP(host) + target = ''.join(sep + part for sep, part in \ + zip(['', ';', '?', '#'], \ + urlparse(selector)[2:]) \ + if part) if data is not None: - h.putrequest('POST', selector) + h.putrequest('POST', target) h.putheader('Content-Type', 'application/x-www-form- urlencoded') h.putheader('Content-Length', '%d' % len(data)) else: - h.putrequest('GET', selector) + h.putrequest('GET', target) if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_auth) if auth: h.putheader('Authorization', 'Basic %s' % auth) if realhost: h.putheader('Host', realhost) }}} I apologize once again ... _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5072> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com