python - pycurl error: Transfer-Encoding in 200 response from HTTPS proxy -



trying write http client using pycurl library talks origin server via proxy.

expecting below flow -
1. http client -> proxy: ssl exchange ## success
2. http client -> proxy: http connect https://origin_server ## sucess
3. proxy -> origin server: tcp connection handshake ## success
4. proxy -> http client: 200 ok ## response received transfer-encoding header set.

following client code -

import pycurl stringio import stringio  buffer = stringio() c = pycurl.curl() url = 'https://origin_server/index' proxy = 'https://local_proxy:8445'  c.setopt(c.url, url) c.setopt(c.proxy, proxy)  c.setopt(c.proxy_sslcert, 'client.cer') c.setopt(c.proxy_cainfo, 'ca.pem') c.setopt(c.proxy_sslkey, 'private.key') c.setopt(c.proxy_ssl_verifypeer, true) c.setopt(c.writedata, buffer) c.setopt(c.verbose, true) c.setopt(c.transfer_encoding, false)  c.perform() c.close() 

error received: traceback (most recent call last):
file "pycurl_client.py", line 20, in
c.perform()
pycurl.error: (56, 'transfer-encoding: in 200 response')

any on root cause of why 'transfer-encoding' set 'chuncked' , how solve this?

the issue libcurl version 7.53. , on upgrading libcurl 7.55 got resolved.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -