kromJx@crosswinds.net's fix that now uses checkprefix() instead of

strnequal() when the third argument was strlen(first argument) anyway.
This makes it less prone to errors. (Slightly edited by me)
This commit is contained in:
Daniel Stenberg 2002-10-28 21:52:00 +00:00
parent 8f52b731f4
commit 01387f42c5
5 changed files with 31 additions and 28 deletions

View file

@ -1218,7 +1218,7 @@ CURLcode Curl_getFormData(struct FormData **finalform,
*/
if(file->contenttype &&
!strnequal("text/", file->contenttype, 5)) {
!checkprefix("text/", file->contenttype)) {
/* this is not a text content, mention our binary encoding */
size += AddFormData(&form, "\r\nContent-Transfer-Encoding: binary", 0);
}