[issue22041] http POST request with python 3.3 through web proxy
Demian Brecht
report at bugs.python.org
Thu Jul 24 07:00:31 CEST 2014
Demian Brecht added the comment:
Ignore my previous note. Digging into this a little more, I think I've possibly found the underlying issue:
If the port is not specified in set_tunnel (as in your example), the buffer sent over the wire looks like
"send: b'POST [PATH] HTTP/1.1\r\nHost: [HOST]:None\r\nAccept-Encoding: identity\r\nContent-Length: 41\r\nAccept: text/plain\r\nContent-type: application/x-www-form-urlencoded\r\n\r\n[FORM_DATA]'"
Note the "None" as the port. However, if the port is explicitly set, then the resulting buffer looks like:
"send: b'POST [PATH] HTTP/1.1\r\nHost: [HOST]:[PORT]\r\nAccept-Encoding: identity\r\nContent-Length: 41\r\nAccept: text/plain\r\nContent-type: application/x-www-form-urlencoded\r\n\r\n[FORM_DATA]'"
Can you retry your example, but specify the port and let me know if that fixes your problem? Either way, this is a bug that I'll submit a patch (and test) for, but I'd like to know that it solves the issue as written.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22041>
_______________________________________
More information about the Python-bugs-list
mailing list