From: Ilia Alshanetsky Date: Mon, 26 Jan 2009 15:19:55 +0000 (+0000) Subject: Fixed bug #47217 (content-type is not set properly for file uploads) X-Git-Tag: php-5.3.0beta1~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51f4e5efcd6253a867a5e16cf472bce7fb1cefda;p=php 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 0065dae654..0a8c0e35c0 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -379,7 +379,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"); @@ -1626,14 +1626,13 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu return 1; } if (type) { - type++; error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key, CURLFORM_NAMELENGTH, (long)string_key_len - 1, 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, string_key,