| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* PHP-8.0:
Mark resource-like objects as non-comparable
|
| |
| |
| |
| |
| |
| |
| | |
As these hold on to some internal resource, there can't be two
"equal" objects with different identity. Make sure the lack of
public properties doesn't result in these being treated as always
equal.
|
| |
| |
| |
| | |
Related to GH-6701
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add CURLStringFile class which works similarly to CURLFile, but
uploads a file from a string rather than a file. This avoids the
need to create a temporary file, or use of a data:// stream.
Basic usage:
$file = new CURLStringFile($data, 'filename.txt', 'text/plain');
curl_setopt($curl, CURLOPT_POSTFIELDS, ['file' => $file]);
Closes GH-6456.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Adapt test case for libcurl 7.75.0+
|
| |
| |
| |
| |
| |
| |
| | |
libcurl 7.75.0 finally adds support for `gophers://`, i.e. gopher over
TLS. The protocol is neither standardized, nor is the protocol
registered with IANA, but well, it is there and the test case should
cater to that.
|
| |
| |
| |
| |
| |
| | |
enabled
Closes GH-6675
|
| |
| |
| |
| | |
Relates to GH-6644
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Add missing derefs in CurlFile
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.4:
Add missing derefs in CurlFile
|
| | |
| | |
| | |
| | | |
As pointed out on GH-6456.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Closes GH-6289
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fix #80595: Resetting POSTFIELDS to empty array breaks request
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fix #80595: Resetting POSTFIELDS to empty array breaks request
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
From libcurl version 7.62.0 and later, it supports DNS-over-HTTPS with
[`CURLOPT_DOH_URL`](https://curl.se/libcurl/c/CURLOPT_DOH_URL.html) option.
This adds integration with the `CURLOPT_DOH_URL` option if libcurl version
is >= 7.62.0 (0x073E00).
For reference, Ubuntu 20.04+ `libcurl4-openssl-dev`-based PHP builds use Curl 7.68.
Closes GH-6612.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is simpler than going through curl, because we can manage
the memory more easily (in particular, this removes the need for
to_free->str). Additionally this allows the CURLOPT_PRIVATE data
to have any type, instead of being implicitly cast to string.
|
| | |
| | |
| | |
| | |
| | |
| | | |
For these callbacks a non-null callback already indicates that
a user callback should be used. We don't need an additional
member to tell us the same thing.
|
| | | |
|
| | |
| | |
| | |
| | | |
Always allocated together with php_curl... no point in that.
|
| | |
| | |
| | |
| | |
| | | |
This is always allocated together with the php_curlm structure,
there's no point in making it a separate allocation.
|
|/ /
| |
| |
| | |
There's no value in making these separate types.
|
| |
| |
| |
| | |
Closes GH-6438.
|
| |
| |
| |
| |
| |
| |
| |
| | |
While the function name starts with curl_multi_*, the function
actually accepts a CurlHandle. As such, it should also use just
$handle as the parameter name.
Closes GH-6435.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Not keeping a reference will not result in use after free, because
curl protects against it, but it will result in a memory leak,
because curl_share_cleanup() will fail. We should make sure that
the share handle object stays alive as long as the curl handles
use it.
|
| |
| |
| |
| |
| | |
cURL 7.73.0 introduced support for the MQTT protocol, so we have to
adapt our expectations regarding the supported protocols.
|
| |
| |
| |
| |
| | |
The issue affected both CurlHandle and CurlMultiHandle. I'll have
to double check this for other resource->object conversions as well.
|
| |
| |
| |
| | |
Closes GH-6155
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #77493: curl_basic_009 fails with newer curl versions
|
| |\
| | |
| | |
| | |
| | | |
* 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>
|
| | |
| | |
| | |
| | |
| | | |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do this because the error is generated by zpp and
it's easier to always throw TypeError there.
This changes the zpp implementation to throw a TypeError only if
the type is actually wrong and throw ValueError for null bytes.
The error message is also split accordingly, to be more precise.
Closes GH-6094.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To allow exporting the php_curl.h header containing curl class
entries, split off a separate curl_private.h header with all the
implementation details.
We may move or expose additional APIs in php_curl.h on an as-needed
basis.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A recurring pattern in old extension: Putting the whole source
code behind HAVE_EXTNAME. This is pointless, as the code is only
compiled if the extension is enabled.
This removes a couple of them, but not all.
|
| | |
| | |
| | |
| | | |
Closes GH-5963
|
| | |
| | |
| | |
| | | |
Closes GH-5958
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
From an engine perspective, named parameters mainly add three
concepts:
* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.
RFC: https://wiki.php.net/rfc/named_params
Closes GH-5357.
|
| | | |
|
| | |
| | |
| | |
| | | |
All of these clearly do not need separation support.
|
| | |
| | |
| | |
| | | |
Closes GH-5758
|
| | |
| | |
| | |
| | | |
Closes GH-5779
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This properly addresses the issue from bug #79741. Silently
interpreting objects as mangled property tables is almost
always a bad idea.
Closes GH-5773.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
exit() is now internally implemented by throwing an exception,
performing a normal stack unwind and a clean shutdown. This ensures
that no persistent resource leaks occur.
The exception is internal, cannot be caught and does not result in
the execution of finally blocks. This may be relaxed in the future.
Closes GH-5768.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #79741
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fixed bug #79741
|