From: Ilia Alshanetsky Date: Mon, 26 Jan 2009 15:21:49 +0000 (+0000) Subject: MFB: Fixed bug #47217 (content-type is not set properly for file uploads) X-Git-Tag: php-5.4.0alpha1~191^2~4382 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21d281ff8c94eff915381a8cfc58fcab4091c1cc;p=php MFB: Fixed bug #47217 (content-type is not set properly for file uploads) --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index b8b2264fc5..22a18b77d8 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -378,7 +378,7 @@ PHP_MINFO_FUNCTION(curl) #if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */ {"CharConv", CURL_VERSION_CONV}, #endif - NULL, 0 + {NULL, 0} }; php_info_print_table_row(1, "Features"); @@ -1686,14 +1686,13 @@ type_conflict: return 1; } if (type) { - type++; error = curl_formadd(&first, &last, CURLFORM_COPYNAME, key, CURLFORM_NAMELENGTH, l, CURLFORM_FILE, postval, - CURLFORM_CONTENTTYPE, type, + CURLFORM_CONTENTTYPE, type + sizeof(";type=") - 1, CURLFORM_END); - *(type - 1) = ';'; + *type = ';'; } else { error = curl_formadd(&first, &last, CURLFORM_COPYNAME, key,