cURL / Mailing Lists / curl-library / Single Mail

curl-library

question about chunked encoding and CURLINFO_SIZE_DOWNLOAD

From: Ryan Braud <rbraud_at_gmail.com>
Date: Thu, 15 May 2014 14:32:54 -0700

Hi, I had a question regarding the size reported by curl_easy_getinfo with
parameter CURLINFO_SIZE_DOWNLOAD. The page
http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html states:

"Pass a pointer to a double to receive the total amount of bytes that were
downloaded. The amount is only for the latest transfer and will be reset
again for each new transfer."

So, I thought this would be the # of bytes transferred over the wire for a
request. However, when using CURLOPT_WRITEFUNCTION and comparing the
number of bytes passed to it with the value returned from
CURLINFO_SIZE_DOWNLOAD, they are the same, even if the response was
returned with chunked encoding. Shouldn't the wire size of a chunked
response be different than the actual page size, due to the encoding
process?

Thanks,
Ryan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-15