cURL / Mailing Lists / curl-library / Single Mail


Forcing curl auto_decoding

From: Mike Hommey <>
Date: Sat, 7 May 2016 09:59:06 +0900


I'm currently implementing the client part of the mercurial HTTP
protocol on top of libcurl. One of the peculiarities of the mercurial
HTTP protocol is that the response to a getbundle command is a chunked
deflate stream, which would be all fine if the response headers
would indicate the content is deflated, but they don't.

I double checked that if I hack the mercurial server code to add
Content-Encoding: deflate or change Transfer-Encoding to "deflate,
chunked", using curl --compressed on the command line does the right
thing and returns the inflated content, while it doesn't with an
unmodified mercurial server.

Is there any way I can trick libcurl into doing the decoding as if the
response headers indicated the stream is deflated? It would be a bummer
if I need to handle the inflate on my own, duplicating functionality
that is already there in libcurl...



List admin:
Received on 2016-05-07