title: pycURL; Received HTTP code 400 from proxy after CONNECT
body: <p>I'm using pycURL to make a few requests to a https site through a http proxy. </p>
  
  <p>Here's my code:</p>
  
  <pre><code>import pycurl
  buf = cStringIO.StringIO()
  c = pycurl.Curl()
  c.setopt(c.URL, url) # 'url' is the base url of the form https://www.target.com
  c.setopt(c.PROXY, proxy) # 'proxy' has the form 1.2.3.4:8080
  c.setopt(c.WRITEFUNCTION, buf.write)
  c.perform()  
  </code></pre>
  
  <p>I've tried this code with different proxies. I get either <code>Proxy CONNECT aborted</code> or <code>Received HTTP code 400 from proxy after CONNECT</code>.</p>
  
  <p>Is there something I'm missing? Should I be using https proxies instead? I've looked around and can't seem to find any help or documentation on pycURL's usage.</p>
  
  <p>Any help appreciated. Thanks! </p>