mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
MFB: Fixed bug #47217 (content-type is not set properly for file uploads)
This commit is contained in:
parent
6d6d3233c1
commit
21d281ff8c
1 changed files with 3 additions and 4 deletions
|
@ -378,7 +378,7 @@ PHP_MINFO_FUNCTION(curl)
|
||||||
#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */
|
#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */
|
||||||
{"CharConv", CURL_VERSION_CONV},
|
{"CharConv", CURL_VERSION_CONV},
|
||||||
#endif
|
#endif
|
||||||
NULL, 0
|
{NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
php_info_print_table_row(1, "Features");
|
php_info_print_table_row(1, "Features");
|
||||||
|
@ -1686,14 +1686,13 @@ type_conflict:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (type) {
|
if (type) {
|
||||||
type++;
|
|
||||||
error = curl_formadd(&first, &last,
|
error = curl_formadd(&first, &last,
|
||||||
CURLFORM_COPYNAME, key,
|
CURLFORM_COPYNAME, key,
|
||||||
CURLFORM_NAMELENGTH, l,
|
CURLFORM_NAMELENGTH, l,
|
||||||
CURLFORM_FILE, postval,
|
CURLFORM_FILE, postval,
|
||||||
CURLFORM_CONTENTTYPE, type,
|
CURLFORM_CONTENTTYPE, type + sizeof(";type=") - 1,
|
||||||
CURLFORM_END);
|
CURLFORM_END);
|
||||||
*(type - 1) = ';';
|
*type = ';';
|
||||||
} else {
|
} else {
|
||||||
error = curl_formadd(&first, &last,
|
error = curl_formadd(&first, &last,
|
||||||
CURLFORM_COPYNAME, key,
|
CURLFORM_COPYNAME, key,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue