curl-users
[ curl-Bugs-505514 ] Fix for correct transfer for empty file
Date: Fri, 18 Jan 2002 12:20:37 -0800
Bugs item #505514, was opened at 2002-01-18 12:20
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=505514&group_id=976
Category: libcurl
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: Fix for correct transfer for empty file
Initial Comment:
Please fix it. If file for the file field is absent or
I use empty file field like @; in parameter, the part
in the request body, where file is describing, must be
empty. In the opposite case It'll be has empty name
and not null body. It is wrong! You need make changes
in the
struct FormData *Curl_getFormData(struct HttpPost
*post,int *sizep) function in part of
------------------------------------------
if(fileread) {
while((nread = fread(buffer, 1, 1024,
fileread))) {
size += AddFormData(&form,
buffer,
nread);
}
if(fileread != stdin)
fclose(fileread);
} else {
size += AddFormData(&form, "[File wasn't
found by client]", 0);
}
------------------------------------------
Just clean text "[File wasn't found by client]" and use
AddFormData(&form, "", 0);
instead AddFormData(&form, "[File wasn't found by
client]", 0); because browsers form empty body if file
field has empty file name.
Thank you.
Antonio.
anton_at_concord.ru
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=505514&group_id=976
Received on 2002-01-18