cURL / Mailing Lists / curl-library / Single Mail


Re: Lost data in chunk HTTP response using libcurl

From: Daniel Stenberg <>
Date: Wed, 17 Oct 2012 15:56:04 +0200 (CEST)

On Wed, 17 Oct 2012, Paul Peng wrote:

> when it needed to handle chunk HTTP, the responses always lost data(checked
> through byte size and md5sum) compared with the responses I captured using
> wireshark. The most obviously losing data are the chunked sizes at the
> beginning of the HTTP responses' message body and the digital 0 to indicate
> ending at the end.
> I suspect my callback function got problem. Here are the relevant codes:

I'm not aware of any such problem in the chunked-encoding decoding code
(assuming you use a modern libcurl version)? We do have several test cases to
verify the chunked decoder.

It would be easy for you to just run the curl tool against such a URL to
verify if the problem is in your code or elsewhere. If you can repeat it with
curl, then please show us a byte stream that we can repeat this problem with!

List admin:
Received on 2012-10-17