homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author olemis
Recipients olemis
Date 2009年01月26日.19:28:43
SpamBayes Score 0.05457936
Marked as misclassified No
Message-id <1232998125.38.0.202815798287.issue5072@psf.upfronthosting.co.za>
In-reply-to
Content
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 ...
History
Date User Action Args
2009年01月26日 19:28:45olemissetrecipients: + olemis
2009年01月26日 19:28:45olemissetmessageid: <1232998125.38.0.202815798287.issue5072@psf.upfronthosting.co.za>
2009年01月26日 19:28:43olemislinkissue5072 messages
2009年01月26日 19:28:43olemiscreate

AltStyle によって変換されたページ (->オリジナル) /