| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
As pointed out on GH-6456.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mainly to work around https://github.com/curl/curl/issues/6455,
but not building the mime structure for empty hashtables is a general
performance optimization, so we do not restrict it to affected cURL
versions (7.56.0 to 7.75.0).
The minor change to bug79033.phpt is unexpected, but should not matter
in practice.
Closes GH-6606.
|
|\
| |
| |
| |
| | |
* PHP-7.3:
Fix #77493: curl_basic_009 fails with newer curl versions
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
libcurl 7.62.0 introduced a maximum protocol length of 8, so this test
case failed with `CURLE_URL_MALFORMAT`. While this is lifted to 40 as
of libcurl 7.65.0, and this test case has already been fixed with
commit e27301c[1], we restore the original intention to check for a
`CURLE_UNSUPPORTED_PROTOCOL ` error.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=e27301c7b37f6a1643a0dc1966919bd62a32bc74>
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fixed bug #79741
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #79199: curl_copy_handle() memory leak
|
| |
| |
| |
| |
| | |
`curl_copy_handle()` already registers a new resource, so we must not
increase the refcount of the original resource.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unfortunately, some Webservers (e.g. IIS) do not implement the (F)CGI
specifications correctly wrt. chunked uploads (i.e. Transfer-encoding:
chunked), but instead pass -1 as CONTENT_LENGTH to the CGI
application. However, our (F)CFI SAPIs (i.e. cgi and cgi-fcgi) do not
support this.
Therefore we try to retrieve the stream size in advance and pass it to
`curl_mime_data_cb()` to prevent libcurl from doing chunked uploads.
This is basically the same approach that `curl_mime_filedata()`
implements, except that we are keeping already opened streams open for
the `read_cb()`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To cater to `curl_copy_handle()` of cURL handles with attached
`CURLFile`s, we must not attach the opened stream, because the stream
may not be seekable, so that we could rewind, when the same stream is
going to be uploaded multiple times. Instead, we're opening the stream
lazily in the read callback.
Since `curl_multi_perfom()` processes easy handles asynchronously, we
have no control of the operation sequence. Since duplicated cURL
handles may be used with multi handles, we cannot use a single arg
structure, but actually have to rebuild the whole mime structure on
handle duplication and attach this to the new handle.
In order to better test this behavior, we extend the test responder to
print the size of the upload, and patch the existing tests accordingly.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #78090: bug45161.phpt takes forever to finish
|
| |
| |
| |
| |
| |
| | |
Not all systems support the discard protocol (TCP port 9), and since
there is no particular reason to use it, we switch to using actual
server testing.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Add CURLOPT CURLOPT_HTTP09_ALLOWED available since 7.64.0
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()
|
| |
| |
| |
| |
| | |
To avoid this, we have to verify the handlers already in
`curl_multi_add_handle()`, not only in `curl_multi_exec()`.
|
| |
| |
| |
| |
| |
| | |
This reverts commit 17a9f1401aeb35fe1e3657b38102a410d151d42f, because
this commit would break ABI, and also due to bug #79013.
We keep the commit for PHP 7.4+, though.
|
| |
| |
| |
| |
| |
| | |
As suggested by Nikita[1].
[1] <https://github.com/php/php-src/pull/5045#discussion_r364265013>
|
| |
| |
| |
| |
| |
| | |
Depending on the libcurl version and perhaps configuration, it may show
additional info (due to `CURLOPT_VERBOSE` being activated), which we
have to ignore, to avoid spurious test failures.
|
| |
| |
| |
| |
| | |
OpenSSL 1.1 does not need crypto locking callbacks, so avoid
detecting and linking against it in the first place.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Only set HAVE_CURL_OPENSSL flag, and remove Windows specific code,
as all of this is only relevant for OpenSSL < 1.1, which is not
used on Windows.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Add missing skipif clause
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #79033: Curl timeout error with specific url and post
|
| |
| |
| |
| |
| |
| | |
We must not set an empty mime structure as `CURLOPT_MIMEPOST`; instead
we set it to `NULL` if `CURLOPT_POSTFIELDS` has been set to an empty
array.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
(cherry picked from commit c68dc6b5e37e74d89e0a387079139c054c8faa81)
|
| |
| |
| |
| |
| |
| |
| | |
As of curl 7.56.0, `curl_formadd()` is deprecated in favor of
`curl_mime_*()`, so we use the latter if available.
(cherry picked from commit a83b68ba56714bfa06737a61af795460caa4a105)
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fixed bug #78775
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.2:
Fixed bug #78775
|
| | |
| | |
| | |
| | |
| | |
| | | |
Clear the OpenSSL error queue before performing SSL stream operations.
As we don't control all code that could possibly be using OpenSSL,
we can't rely on the error queue being empty.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.
As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).
I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | |
| | |
| | |
| | | |
Save multi_info_read() result into easy handle.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Used in php-src the past and today removed and not used anymore:
- HAVE_CURL_EASY_STRERROR
- HAVE_CURL_MULTI_STRERROR
- HAVE_NEW_MIME2TEXT
- HAVE_MBSTR_CN
- HAVE_MBSTR_JA
- HAVE_MBSTR_KR
- HAVE_MBSTR_RU
- HAVE_MBSTR_TW
Part of oniguruma which doesn't use these anymore
- NOT_RUBY
- HAVE_STDARG_PROTOTYPES
Unused:
- HAVE_MPIR
Closes GH-4427
|
| | |
| | |
| | |
| | |
| | |
| | | |
AC_PROG_CPP is already called in configure.ac.
Closes GH-4425
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The output of the three handles may be interleaved. We already have
curl_basic_018.phpt which uses curl_multi_getcontent() and thus
has predictable output. As such, I'm dropping this test altogether.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
We don't have a guarantee in which order the output here will
occur. And it's not really relevant for the test anyway, so use a
wildcard.
|
| | |
| | |
| | |
| | |
| | |
| | | |
I don't think there's any need to make remote connections here
(and bugs.php.net is down right now...) so just use local files
instead.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
libcurl may link against 7 different ssl libraries, all of which
are thread-safe -- apart from openssl, of course. We check for
openssl and register locking callbacks in that case, but we should
not warn if any other library is used.
|
| | |
| | |
| | |
| | |
| | | |
We need to add the curl-specific flags, but we also need to preserve
the general flags, to keep around important stuff like -m32.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix test regarding Unix Domain Sockets on Windows
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix test regarding Unix Domain Sockets on Windows
|
| | |
| | |
| | |
| | |
| | | |
Recent Windows versions actually support Unix Domain Sockets. Cf.
<https://github.com/curl/curl/pull/3939>.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix test case for cURL 7.65.0
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix test case for cURL 7.65.0
|