cURL / Mailing Lists / curl-library / Single Mail


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

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

> From: curl-library [] on behalf of Florian
> Pritz []
> Sent: Thursday, August 09, 2012 5:13 PM
> To:
> 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.

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:
Received on 2012-08-10