From: Ilia Alshanetsky Date: Mon, 26 Oct 2009 12:57:01 +0000 (+0000) Subject: Fixed bug #49921 (Curl post upload functions changed). X-Git-Tag: php-5.2.12RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91be77217406acf5f4c480f34df8c2e139f0db62;p=php Fixed bug #49921 (Curl post upload functions changed). --- diff --git a/NEWS b/NEWS index 038b960fe6..4c245d7cea 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ PHP NEWS (Jani) - Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction). (ben dot pineau at gmail dot com, Ilia) +- Fixed bug #49921 (Curl post upload functions changed). (Ilia) - Fixed bug #49972 (AppendIterator undefined function crash). (Johannes) - Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia, sjoerd at php dot net) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 9e970936b6..6666aacc0f 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1625,7 +1625,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key, CURLFORM_NAMELENGTH, (long)string_key_len - 1, - CURLFORM_FILENAME, filename ? filename : postval, + CURLFORM_FILENAME, filename ? filename + sizeof(";filename=") - 1 : postval, CURLFORM_CONTENTTYPE, type ? type + sizeof(";type=") - 1 : "application/octet-stream", CURLFORM_FILE, postval, CURLFORM_END);