cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3370895 ] curl will reuse old Content-Length if none received

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 22 Jul 2011 22:52:17 +0200

Bugs item #3370895, was opened at 2011-07-19 06:45
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3370895&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: bad behaviour
>Status: Closed
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Ben Winslow (raineth)
Assigned to: Daniel Stenberg (bagder)
Summary: curl will reuse old Content-Length if none received

Initial Comment:
curl 7.21.7

When an easy handle is used to download an URI which has no Content-Length header (or equivalent) after downloading an URI which does, the value from the previous transfer is reused and returned by CURLINFO_CONTENT_LENGTH_DOWNLOAD. This is because the progress flags (used to determine whether such a header was received) are not reset between transfers. The quick fix I used is attached.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2011-07-22 22:52

Message:
Thanks for the report, this problem is now fixed in the git repository.

To try it out, you either checkout/update your git clone:
http://curl.haxx.se/source.html

or you try tomorrow's daily snapshot: http://curl.haxx.se/snapshots/

----------------------------------------------------------------------

Comment By: Ben Winslow (raineth)
Date: 2011-07-21 08:17

Message:
Sure, why not? My email is rain at bluecherry dot net.

Thanks!

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2011-07-20 01:14

Message:
Thanks, this is truly a bug that has been around since the age of dawn!

If you can provide me with an email address as well, I'll have you
credited in git as author of this patch! (by private email to me daniel at
haxx.se is fine) you can also select not to and then I'll just credit you
in the commit message by name instead.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3370895&group_id=976
Received on 2011-07-22

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET