cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Wrong http request size calculation when uploading /proc/cpuinfo

From: Joe Mason <jmason_at_rim.com>
Date: Thu, 9 Aug 2012 22:08:42 +0000

> From: curl-library [curl-library-bounces_at_cool.haxx.se] on behalf of Florian
> Pritz [bluewind_at_xinu.at]
> Sent: Thursday, August 09, 2012 5:13 PM
> To: curl-library_at_cool.haxx.se
> Subject: Re: Wrong http request size calculation when uploading /proc/cpuinfo
>
> So far I have only seen this happen for files read from some pseudo file
> system like /proc and those tend to be small.

I think if the OS filesystem is not returning the right value from stat, that's not curl's problem. I would fix this by capping the amount of data sent to that returned by stat (and maybe printing a warning that not all the file data was sent, and why). So for /proc/cpuinfo it would just not send anything. You can always copy it to a regular temp file and then send that instead.

Joe
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

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