[issue22041] http POST request with python 3.3 through web proxy

2014-07-28 Thread Alejandro MJ
Alejandro MJ added the comment: Thanks a lot for your help, as you suggested the problem was because of the method set_tunnel. I've tested the code that you have posted and now works perfectly. I'll keep in mind this for future works. We can conclude that it's not really a bug of Python, so

[issue22041] http POST request with python 3.3 through web proxy

2014-07-28 Thread Demian Brecht
Demian Brecht added the comment: No problem, happy you were able to get things sorted. Feel free to close this issue as I've opened #22095 to address the host port header issue. -- ___ Python tracker rep...@bugs.python.org

[issue22041] http POST request with python 3.3 through web proxy

2014-07-28 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22041 ___ ___

[issue22041] http POST request with python 3.3 through web proxy

2014-07-25 Thread Alejandro MJ
Alejandro MJ added the comment: Thanks a lot for your help! I've tested it in Linux, Python version 3.3.5 and the message obtained is this: [404 Not Found]. The script is this one (changing of course the ip_address and the proxy_url values): import http.client, urllib.parse data =

[issue22041] http POST request with python 3.3 through web proxy

2014-07-25 Thread Alejandro MJ
Alejandro MJ added the comment: I've wrote these sentences on my SUSE, python is installed on path: /usr/local/pr/python computer002:/usr/local/pr/python # patch -p1 --dry-run issue22041_1.patch can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text

[issue22041] http POST request with python 3.3 through web proxy

2014-07-25 Thread Demian Brecht
Demian Brecht added the comment: To add a little more detail, from what I gather, CONNECT support may be unsupported or limited (i.e. only allowing SSL connections) on various proxy servers. If the code snippet in my previous post solves your issue, then I would assume that to be the case

[issue22041] http POST request with python 3.3 through web proxy

2014-07-25 Thread Demian Brecht
Demian Brecht added the comment: Sorry Alejandro, I should have clarified: The attached patch is for dev, so the failure you're seeing when attempting to apply the patch against 3.3 is expected. It effectively does the same thing as explicitly setting the port as you have already attempted.

[issue22041] http POST request with python 3.3 through web proxy

2014-07-24 Thread Demian Brecht
Demian Brecht added the comment: I've attached a patch that solves the issue I encountered. It would be great if you could confirm whether or not it also resolves the issue as reported. -- keywords: +patch Added file: http://bugs.python.org/file36066/issue22041.patch

[issue22041] http POST request with python 3.3 through web proxy

2014-07-24 Thread Demian Brecht
Demian Brecht added the comment: Attached a new patch with with a simple test. -- Added file: http://bugs.python.org/file36079/issue22041_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22041

[issue22041] http POST request with python 3.3 through web proxy

2014-07-23 Thread Alejandro Mj
Changes by Alejandro Mj witchar...@gmail.com: -- nosy: -AlexMJ ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22041 ___ ___ Python-bugs-list

[issue22041] http POST request with python 3.3 through web proxy

2014-07-23 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22041 ___ ___

[issue22041] http POST request with python 3.3 through web proxy

2014-07-23 Thread Demian Brecht
Demian Brecht added the comment: Hi Alejandro, I've spent a little time looking into this. I haven't been able to reproduce what you're seeing on Windows exactly, but I've encountered other issues along the same path using a local squid instance (localhost:4242): from http.client import OK,

[issue22041] http POST request with python 3.3 through web proxy

2014-07-23 Thread Demian Brecht
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:

[issue22041] http POST request with python 3.3 through web proxy

2014-07-22 Thread Alejandro MJ
New submission from Alejandro MJ: I'm trying this specific method with python, in order to use a different ip source, to do a POST request: import http.client, urllib.parse data = urllib.parse.urlencode({'QLastname': 'DIAZ HERNANDEZ', 'QFirstname': 'JAIME'}) headers = {Content-type: