summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-01-19 11:08:05 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-01-19 11:08:05 +0000
commite911945c55b32ea802b7eec4914499e102168951 (patch)
tree4febeeb68f2386cd3856ffb39655acc9b3299686
parent6d58d13710d2073d93d9d01fad4323ede004df9c (diff)
downloadgnurl-e911945c55b32ea802b7eec4914499e102168951.tar.gz
gnurl-e911945c55b32ea802b7eec4914499e102168951.tar.bz2
gnurl-e911945c55b32ea802b7eec4914499e102168951.zip
#505514, as correctly pointed out by Antonio (anton@concord.ru), trying to
post a non-existing file should include nothing, not an error text!
-rw-r--r--lib/formdata.c9
1 files changed, 6 insertions, 3 deletions
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);
}