cURL / Mailing Lists / curl-library / Single Mail

curl-library

Content-Length Vs Chunked Transfer Encoding

From: Sandeep Sastry <sandeep.a.sastry_at_gmail.com>
Date: Thu, 26 Jun 2014 15:19:26 +0400

Hi,

Though there are some existing discussion related to the topic
"Content-Length Vs Chunked Transfer Encoding" on various non-curl sites, I
wanted to understand how it works with libcurl.
I am using curl in my client application and as part of the application, I
show progress bar for upload and download activity. The old server used to
send Content-Length header in the response to GET requests, consistently.
But now the new server, does not send Content-Length, but sends Chunked
Transfer Encoding. This is breaking my progress functionality as I always
get "0" for total download size.
Is there a way for me to still get the progress bar going, though the
server does not send Content-Length? Because when contacted the server
guys, they told me they would no more be using Content-Length.

Thanks,
-Sandeep

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