0

pycurl is a python binding for liburl. For most of the options in libcurl there is a corresponding on in pycurl. But I can not find the ones for CURLOPT_ACCEPT_ENCODING and CURLOPT_TRANSFER_ENCODING.

By the way, I am using ubuntu 13.04, and pycurl version is 'libcurl/7.29.0 GnuTLS/2.12.23 zlib/1.2.7 libidn/1.25 librtmp/2.3'

Daniel Dai
  • 1,019
  • 11
  • 24

1 Answers1

0

I found a pycurl.ENCODING option in pycurl. and I did a test by setting:

c.setopt(c.ENCODING, 'gzip,deflate')

and captured the traffic with wireshark,

Accept-Encoding: gzip,deflate

is added.

So pycurl.ENCODING should be the corresponding option of CURLOPT_ACCEPT_ENCODING.

According to http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

Option CURLOPT_ACCEPT_ENCODING was called CURLOPT_ENCODING before libcurl 7.21.6

But I haven't find CURLOPT_TRANSFER_ENCODING in pycurl.

Daniel Dai
  • 1,019
  • 11
  • 24