curl-library
Re: Bypassing libcurl's handling of content-encoding and transfer-encoding
Date: Mon, 29 Jan 2007 13:47:21 +0100 (CET)
On Mon, 29 Jan 2007, Shmulik Regev wrote:
> My question is, will it be possible to add a configuration option to turn
> off these content mutating handling?
I can't say I agree that they are "content mutating", but apart from that and
since others have previously asked for something similar regarding the chunked
transfers, I can't see that I would mind a clean approach that let libcurl do
this. Just be aware that it still needs to parse all the chunks (and chunk
trailer) properly so that libcurl knows when the response ends.
> Especially if you do want (like I occasionally do) to process the response
> body prior to returning it to the user or benefit from connection reuse.
If you process it before you return it to the client, then why not remove the
chunked-transfer header and add a content-length and send back the whole body
in a non-chunked way? It would save you from having to re-implement the
chunked decoder yourself...
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-01-29