I use pycURL to make multiple requests to an https site through an http proxy.
Here is my code:
import pycurl
buf = cStringIO.StringIO()
c = pycurl.Curl()
c.setopt(c.URL, url)
c.setopt(c.PROXY, proxy)
c.setopt(c.WRITEFUNCTION, buf.write)
c.perform()
I tried this code with different proxies. I get either Proxy CONNECT abortedor Received HTTP code 400 from proxy after CONNECT.
Is there something I am missing? Should I use https proxy instead? I looked around and cannot find any help or documentation on using pycURL.
Any help appreciated. Thank you
source
share