summaryrefslogtreecommitdiff
path: root/ext/curl/multi.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-8.0'Nikita Popov2021-02-161-0/+1
|\ | | | | | | | | * PHP-8.0: Mark resource-like objects as non-comparable
| * Mark resource-like objects as non-comparableNikita Popov2021-02-161-0/+1
| | | | | | | | | | | | | | 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.
* | Generate class entries for a few extensionsMáté Kocsis2021-02-031-5/+1
| | | | | | | | Relates to GH-6644
* | Remove method member from php_curl_callbackNikita Popov2021-01-041-1/+0
| | | | | | | | | | | | 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.
* | Don't allocate php_curl_handlers separatelyNikita Popov2021-01-041-4/+4
| | | | | | | | Always allocated together with php_curl... no point in that.
* | Don't allocate php_curlm_handlers separatelyNikita Popov2021-01-041-19/+13
| | | | | | | | | | This is always allocated together with the php_curlm structure, there's no point in making it a separate allocation.
* | Use single typedef for curl callbacksNikita Popov2021-01-041-2/+2
|/ | | | There's no value in making these separate types.
* Fixed bug #80121Nikita Popov2020-10-011-0/+6
| | | | | The issue affected both CurlHandle and CurlMultiHandle. I'll have to double check this for other resource->object conversions as well.
* Private/public split curl headerNikita Popov2020-09-071-2/+3
| | | | | | | | | 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.
* Remove some unnecessary HAVE_EXTNAME guardsNikita Popov2020-09-071-4/+0
| | | | | | | | 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.
* Promote warnings to exceptions in ext/curlMáté Kocsis2020-08-141-1/+1
| | | | Closes GH-5963
* Remove proto comments from C filesMax Semenik2020-07-061-22/+11
| | | | Closes GH-5758
* Add flag to forbid dynamic property creation on internal classesNikita Popov2020-06-241-1/+1
| | | | | | | | | | | | | | | | | | | While performing resource -> object migrations, we're adding defensive classes that are final, non-serializable and non-clonable (unless they are, of course). This path adds a ZEND_ACC_NO_DYNAMIC_PROPERTIES flag, that also forbids the creation of dynamic properties on these objects. This is a subset of #3931 and targeted at internal usage only (though may be extended to userland at some point in the future). It's already possible to achieve this (what the removed WeakRef/WeakMap code does), but there's some caveats: First, this simple approach is only possible if the class has no declared properties, otherwise it's necessary to special-case those properties. Second, it's easy to make it overly strict, e.g. by forbidding isset($obj->prop) as well. And finally, it requires a lot of boilerplate code for each class. Closes GH-5572.
* Also allow casting CurlMultiHandlesNikita Popov2020-06-221-0/+1
|
* Convert CURL resources to objectsMáté Kocsis2020-06-171-143/+157
| | | | | | Closes GH-5402 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* Fix [-Wundef] warning in cURL extensionGeorge Peter Banyard2020-05-161-1/+1
|
* Bump required libcurl version to 7.29.0Christoph M. Becker2020-01-191-40/+0
| | | | | | | libcurl 7.29.0 has been released almost eight years ago, so this version is supposed to be available practically everywhere. This bump also allows us to get rid of quite some conditional code and tests catering to very old libcurl versions.
* Merge branch 'PHP-7.4'Christoph M. Becker2020-01-081-0/+2
|\ | | | | | | | | * PHP-7.4: Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-01-081-0/+2
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()
| | * Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()Christoph M. Becker2020-01-081-0/+2
| | | | | | | | | | | | | | | To avoid this, we have to verify the handlers already in `curl_multi_add_handle()`, not only in `curl_multi_exec()`.
* | | Use RETURN_THROWS() after zend_fetch_resource*()Máté Kocsis2020-01-031-12/+12
| | |
* | | Cleanup return values when parameter parsing is unsuccessfulMáté Kocsis2019-10-301-3/+1
| | |
* | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | | | | | | | | | Closes GH-4732.
* | | Remove some misleading RETURN_FALSENikita Popov2019-08-121-12/+12
|/ / | | | | | | | | | | These functions throw, so they can't return false. This is just a subset...
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-07-181-0/+5
|\ \ | |/
| * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-07-181-0/+5
| |\
| | * Fixed bug #77946Abyr Valg2019-07-181-0/+5
| | | | | | | | | | | | Save multi_info_read() result into easy handle.
* | | Merge branch 'PHP-7.3' into PHP-7.4Rasmus Lerdorf2019-05-211-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix precedence issue causing sub-second timeouts to be 0 in curl_multi_select
| * | Merge branch 'PHP-7.2' into PHP-7.3Rasmus Lerdorf2019-05-211-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix precedence issue causing sub-second timeouts to be 0 in curl_multi_select
| | * Fix precedence issue causing sub-second timeouts to be 0 inRasmus Lerdorf2019-05-211-1/+1
| | | | | | | | | | | | curl_multi_select
* | | Deprecate CURLPIPE_HTTP1Christoph M. Becker2019-05-071-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | `CURLPIPE_HTTP1` is deprecated and has no effect as of cURL 7.62.0[1]. We therefore deprecate the PHP constant as well, and trigger a warning that it is no longer supported, if used against cURL 7.62.0 and up. [1] <https://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html>
* | | Fix commentChristoph M. Becker2019-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 0x2d == 45, not 46. However, `CURLMOPT_PUSHFUNCTION` is actually available as of cURL 7.44.0[1], while we make the respective PHP constants available only as of cURL 7.46.0[2]. [1] <https://curl.haxx.se/libcurl/c/CURLMOPT_PUSHFUNCTION.html> [2] <http://git.php.net/?p=php-src.git;a=blob;f=ext/curl/interface.c;h=fdf855278eef6f32f26c49b54f56aca9bd7007c3;hb=HEAD#l1289>
* | | Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function ↵Dmitry Stogov2019-04-241-2/+2
| | | | | | | | | | | | by reference
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-03-151-5/+1
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-03-151-5/+1
| |\ \ | | |/
| | * Don't immediately destroy curl pushfunctionNikita Popov2019-03-151-5/+1
| | |
* | | Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | | Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
| | |
* | | Merge branch 'PHP-7.3'Nikita Popov2019-01-181-0/+1
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-01-181-0/+1
| |\ \ | | |/
| | * Fixed bug #76675Pedro Magalhães2019-01-181-0/+1
| | | | | | | | | | | | Leave a reference to the resource in the php_curl.
* | | Implement typed propertiesNikita Popov2019-01-111-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Co-authored-by: Joe Watkins <krakjoe@php.net> Co-authored-by: Dmitry Stogov <dmitry@zend.com>
* | | Clean up unnecessary ternary expressions and simplify some returnsGabriel Caruso2018-12-031-5/+2
|/ / | | | | | | | | | | | | - Simplify conditions - Use ZEND_HASH_APPLY_* instead of hard-coded booleans - Use ZEND_NORMALIZE_BOOL - Drop sign in favor of ZEND_NORMALIZE_BOOL
* | Merge branch 'PHP-7.2' into PHP-7.3Pierrick Charron2018-09-171-1/+17
|\ \ | |/
| * Merge branch 'PHP-7.1' into PHP-7.2Pierrick Charron2018-09-171-1/+17
| |\
| | * Fix 76480: Use curl_multi_wait() so that timeouts are respectedPierrick Charron2018-09-171-1/+17
| | |
| | * Fix potential memory leak in curl extensionThomas Punt2018-04-291-1/+1
| | |
| | * year++Xinchen Hui2018-01-021-1/+1
| | |
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
| * | year++Xinchen Hui2018-01-021-1/+1
| | |