]> granicus.if.org Git - php/commitdiff
Fixed bug #49921 (Curl post upload functions changed).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 26 Oct 2009 12:57:01 +0000 (12:57 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 26 Oct 2009 12:57:01 +0000 (12:57 +0000)
NEWS
ext/curl/interface.c

diff --git a/NEWS b/NEWS
index a492438156f1af1763584ffe0c5a03f408fffbb6..71d62c394dc4d791dfddf57305f9453149aecd52 100644 (file)
--- 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).
index cacf58e7c378cbede01dc911570bd92f8d123723..dfeada8c18a037a27674478978becb9ef1518e86 100644 (file)
@@ -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);