cURL / Mailing Lists / curl-library / Single Mail

curl-library

formdata.c fix for file upload

From: Dylan Salisbury <dylan_at_tellme.com>
Date: Thu, 31 Mar 2005 16:59:29 -0800

The recent fix to accommodate posts of zero-byte files (and files of other
particular sizes) applied in v1.82 of curl seems to have a bug.
Specifically Curl_FormReader assumes that after readfromfile returns zero,
the next item in the form is non-file data, but it could be another file or
the end of the form. Here's a patch against v1.86 that seems to deal with
the issue better:

 

I haven't tested this particular patch yet (I've tested a similar patch
against an old version) -- I'm posting it now in case anyone notices right
away that it doesn't completely solve the problem or has something else
wrong with it.

 

Thanks in advance for any comments,

 

 

Dylan

Received on 2005-04-01