debugging https connections with urllib2?

Irmen de Jong irmen.NOSPAM at xs4all.nl
Sat Jun 18 15:40:55 EDT 2011


On 18-6-2011 20:57, Roy Smith wrote:
> We've got a REST call that we're making to a service provider over https 
> using urllib2.urlopen().  Is there any way to see exactly what's getting 
> sent and received over the network (i.e. all the HTTP headers) in plain 
> text?  Things like tcpdump and strace only have access to the encrypted 
> data.
> 
> We can't just switch to using http because the endpoint we're talking to 
> (and don't have control over) refuses plain-text connections.

Put a proxy between the https-service endpoint and your client app.
Let the proxy talk https and let your client talk http to the proxy.

Irmen





More information about the Python-list mailing list