cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: bug: afert redirect, the content length is not reset

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Wed, 10 Dec 2008 12:16:27 -0600

On Dec 10, 2008 Dan Fandrich <dan_at_coneharvesters.com> wrote:

> But there's no way to get the content length in a chunked transfer
> until the end, no matter how handy it is.

CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_SIZE_DOWNLOAD
are two different things. The content-length (if available)
should (?) be there as soon as the headers are received. But
in the case of a redirect, I think most users would expect
it to be valid only after the final set of headers, not the
first one. (i.e. the content-length of a redirect page is
probably not so interesting.)

But it should be easy enough for an application to parse
this information "manually" from the header callback.

- Jeff
Received on 2008-12-10