]> 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 038b960fe6cdbf57d30c149e2761890f089488e1..4c245d7ceabdc9c8959081673d655e245ac49549 100644 (file)
--- 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)
index 9e970936b67b5dddce4351f05f7ec11173308aac..6666aacc0f0023725762f0aa65c732fef42c630b 100644 (file)
@@ -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);