Message77789
| Author |
ajaksu2 |
| Recipients |
ResulCetin, ajaksu2, amaury.forgeotdarc, dato, exarkun, jhylton |
| Date |
2008年12月14日.11:31:53 |
| SpamBayes Score |
9.687021e-07 |
| Marked as misclassified |
No |
| Message-id |
<1229254324.09.0.869278155459.issue4631@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Took me a bit of Wiresharking to find this out, the problem is that we
are asking for the page using HTTP 1.1 in 3.0.
Here's a workaround patch for those who need it quick, I have yet to
look at urllib to see what can be fixed there.
---
Index: Lib/http/client.py
===================================================================
--- Lib/http/client.py (revision 67716)
+++ Lib/http/client.py (working copy)
@@ -600,7 +600,7 @@
class HTTPConnection:
_http_vsn = 11
- _http_vsn_str = 'HTTP/1.1'
+ _http_vsn_str = 'HTTP/1.0'
response_class = HTTPResponse
default_port = HTTP_PORT
---
This is what we send in 2.5 and 3.0:
GET /cgi-bin/bugreport.cgi?mbox=yes;bug=123456 HTTP/1.0
User-Agent: Python-urllib/1.17
GET /cgi-bin/bugreport.cgi?mbox=yes;bug=123456 HTTP/1.1
Accept-Encoding: identity
User-Agent: Python-urllib/3.1 |
|