summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--ext/curl/interface.c2
2 files changed, 2 insertions, 1 deletions
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);