From ff5a2ce931852e8dfbcc90b524b485bba93c9911 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 26 Oct 2009 12:57:01 +0000 Subject: [PATCH] Fixed bug #49921 (Curl post upload functions changed). --- NEWS | 1 + ext/curl/interface.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a492438156..71d62c394d 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,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 #49855 (import_request_variables() always returns NULL). (Ilia, sjoerd at php dot net) - Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning). diff --git a/ext/curl/interface.c b/ext/curl/interface.c index cacf58e7c3..dfeada8c18 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1946,7 +1946,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); -- 2.40.0