From: Daniel Stenberg Date: Sat, 19 Jan 2002 11:08:05 +0000 (+0000) Subject: #505514, as correctly pointed out by Antonio (anton@concord.ru), trying to X-Git-Tag: curl-7_9_3~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e911945c55b32ea802b7eec4914499e102168951;p=curl #505514, as correctly pointed out by Antonio (anton@concord.ru), trying to post a non-existing file should include nothing, not an error text! --- diff --git a/lib/formdata.c b/lib/formdata.c index c767da9fc..bc137cfd0 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -1155,10 +1155,13 @@ struct FormData *Curl_getFormData(struct HttpPost *post, } if(fileread != stdin) fclose(fileread); - } else { - size += AddFormData(&form, "[File wasn't found by client]", 0); } - } else { + else { + /* File wasn't found, add a nothing field! */ + size += AddFormData(&form, "", 0); + } + } + else { /* include the contents we got */ size += AddFormData(&form, post->contents, post->contentslength); }