]> granicus.if.org Git - php/commit
Extend CURLFile to support streams
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 29 Apr 2019 08:21:07 +0000 (10:21 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 29 Apr 2019 08:21:07 +0000 (10:21 +0200)
commitc68dc6b5e37e74d89e0a387079139c054c8faa81
treedb61374f62438a00fc6dedd3eb7bf3d2ed88fcb9
parent22e9a5e0c382b6accefe809bf59ba08738427593
Extend CURLFile to support streams

Due to former restrictions of the libcurl API, curl multipart/formdata
file uploads supported only proper files.  However, as of curl 7.56.0
the new `curl_mime_*()` API is available (and already supported by
PHP[1]), which allows us to support arbitrary *seekable* streams, which
is generally desirable, and particularly resolves issues with the
transparent Unicode and long part support on Windows (see bug #77711).

Note that older curl versions are still supported, but CURLFile is
still restricted to proper files in this case.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=a83b68ba56714bfa06737a61af795460caa4a105>
NEWS
UPGRADING
ext/curl/interface.c
ext/curl/php_curl.h
ext/curl/tests/bug77711.phpt [new file with mode: 0644]
ext/curl/tests/curl_copy_handle_variation3.phpt [new file with mode: 0644]
ext/curl/tests/curl_file_upload_stream.phpt [new file with mode: 0644]