Message249361
When using httplib / http.client to connect to an HTTPS website through a proxy (by making a tunnel with a CONNECT request), there is no way to retrieve the HTTP headers which the proxy sends back in response to that CONNECT request.
This becomes a problem when using rotating proxy providers like ProxyMesh, who send useful information in those headers (for instance, "X-ProxyMesh-IP" contains the IP address of the proxy, which is necessary to keep the same address throughout the session).
It would be nice to save those headers in a property of the HTTPConnection class (e.g. self._tunnel_response_headers), which would be set up inside the _tunnel method (as proposed in the attached patch, lines 748 and 827-831). This would allow to get the headers back and/or pass them to a higher-level library (such as requests). |
|
Date |
User |
Action |
Args |
2015-08-30 17:41:56 | thomas.belhalfaoui | set | recipients:
+ thomas.belhalfaoui |
2015-08-30 17:41:50 | thomas.belhalfaoui | set | messageid: <1440956510.2.0.613573748355.issue24964@psf.upfronthosting.co.za> |
2015-08-30 17:41:50 | thomas.belhalfaoui | link | issue24964 messages |
2015-08-30 17:41:49 | thomas.belhalfaoui | create | |
|