#505514, as correctly pointed out by Antonio (anton@concord.ru), trying to

post a non-existing file should include nothing, not an error text!
This commit is contained in:
Daniel Stenberg 2002-01-19 11:08:05 +00:00
parent 6d58d13710
commit e911945c55

View File

@ -1155,10 +1155,13 @@ struct FormData *Curl_getFormData(struct HttpPost *post,
} }
if(fileread != stdin) if(fileread != stdin)
fclose(fileread); 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 */ /* include the contents we got */
size += AddFormData(&form, post->contents, post->contentslength); size += AddFormData(&form, post->contents, post->contentslength);
} }