cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Bug in curl 7.19 for CURLINFO_CONTENT_LENGTH_DOWNLOAD?

From: Gabriel Kuri <gkuri_at_ieee.org>
Date: Tue, 27 Oct 2009 13:09:48 -0700

Yes, the patch fixes the problem, thank you.

An easy way to reproduce the problem is by using the FUSE based driver
(s3fs) for the Amazon S3 storage cloud ...

        http://code.google.com/p/s3fs/wiki/FuseOverAmazon

Setup an account with Amazon (it's super cheap and there's no minimum
monthly fees).

Download, compile, and install s3fs.

Mount your S3 "bucket" with s3fs and touch an empty file (should be size
zero) and run an ls -l and you'll see that it's size is MAXINT.
Alternatively create a directory and you'll see that it's size is MAXINT.

Cheers,
Gabe

Daniel Stenberg wrote:
> On Wed, 21 Oct 2009, Gabriel Kuri wrote:
>
>> Previously, this code simply returned data->progress.size_dl. Now, if
>> the PGRS_DL_SIZE_KNOWN bit is not set, it returns -1 instead. As the
>> FUSE driver driver casts the returned value into an unsigned variable,
>> the result ends up becoming MAXINT.
>
> Thanks for the report.
>
> Can you provide a recipe for how to (easily) repeat this bug/problem so
> that we can write up a test case for it?
>
> Does the attached patch fix the problem for you?
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-27