summaryrefslogtreecommitdiff
path: root/ext/curl
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Fixed bug #79741Nikita Popov2020-06-262-2/+18
| | |
* | | Remove unnecessary PHPDoc-alike blocks from testsMáté Kocsis2020-06-2415-79/+0
| | | | | | | | | | | | Closes GH-5759
* | | Add flag to forbid dynamic property creation on internal classesNikita Popov2020-06-243-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Skip two curl tests under asanNikita Popov2020-06-242-0/+2
| | | | | | | | | | | | | | | These tests leak with the curl version on ubuntu 20.04. This should be fixed when we switch exit to use an exception.
* | | Include stub hash in generated arginfo filesNikita Popov2020-06-242-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hash is used to check whether the arginfo file needs to be regenerated. PHP-Parser will only be downloaded if this is actually necessary. This ensures that release artifacts will never try to regenerate stubs and thus fetch PHP-Parser, as long as you do not modify any files. Closes GH-5739.
* | | Also allow casting CurlMultiHandlesNikita Popov2020-06-224-2/+8
| | |
* | | Allow casting CurlHandle to intNikita Popov2020-06-192-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | (int) $curlHandle will return spl_object_id($curlHandle). This makes curl handle objects backwards compatible with code using (int) $curlHandle to obtain a resource ID. Closes GH-5743.
* | | Fix UNKNOWN default values in ext/curlMáté Kocsis2020-06-186-20/+17
| | | | | | | | | | | | Closes GH-5734
* | | Remove the deprecated parameter of curl_version()Máté Kocsis2020-06-184-29/+3
| | |
* | | Fixed multiple definitionDmitry Stogov2020-06-181-2/+0
| | |
* | | Convert CURL resources to objectsMáté Kocsis2020-06-1717-462/+596
| | | | | | | | | | | | | | | | | | Closes GH-5402 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* | | Fix [-Wundef] warning in cURL extensionGeorge Peter Banyard2020-05-165-7/+7
| | |
* | | Generate method entries from stubs for curl, ffi, pdo, pharMáté Kocsis2020-04-143-11/+22
| | | | | | | | | | | | Closes GH-5375
* | | Store default parameter values of internal functions in arg infoMáté Kocsis2020-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* | | Generate function entries from stubs for a couple of extensionsMáté Kocsis2020-04-044-103/+116
| | | | | | | | | | | | Closes GH-5347
* | | Do not include the same stub multiple timesMáté Kocsis2020-04-032-2/+2
| | | | | | | | | | | | Closes GH-5322
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-122-2/+24
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79199: curl_copy_handle() memory leak
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-122-2/+24
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79199: curl_copy_handle() memory leak
| | * Fix #79199: curl_copy_handle() memory leakChristoph M. Becker2020-03-122-2/+24
| | | | | | | | | | | | | | | `curl_copy_handle()` already registers a new resource, so we must not increase the refcount of the original resource.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-021-2/+14
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79013: Content-Length missing when posting a curlFile with curl
| * | Fix #79013: Content-Length missing when posting a curlFile with curlChristoph M. Becker2020-03-021-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()`.
* | | Change argument error message formatMáté Kocsis2020-02-261-1/+1
| | | | | | | | | | | | Closes GH-5211
* | | Make type error messages more consistentMáté Kocsis2020-02-171-1/+1
| | | | | | | | | | | | Closes GH-5092
* | | Remove CURLOPT_PASSWDDATA block CURLOPT_PASSWDDATA was removed from curl as ↵ekinhbayar2020-02-111-6/+1
| | | | | | | | | | | | | | | | | | of 7.10.8 Closes GH-5166.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-0410-70/+221
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79019: Copied cURL handles upload empty file
| * | Fix #79019: Copied cURL handles upload empty fileChristoph M. Becker2020-02-0410-70/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-042-12/+10
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #78090: bug45161.phpt takes forever to finish
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-042-12/+10
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #78090: bug45161.phpt takes forever to finish
| | * Fix #78090: bug45161.phpt takes forever to finishChristoph M. Becker2020-02-042-12/+10
| | | | | | | | | | | | | | | | | | 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.
* | | Reindent phpt filesNikita Popov2020-02-0322-195/+195
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-261-0/+7
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add CURLOPT CURLOPT_HTTP09_ALLOWED available since 7.64.0
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-01-261-0/+7
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Add CURLOPT CURLOPT_HTTP09_ALLOWED available since 7.64.0
| | * Add CURLOPT CURLOPT_HTTP09_ALLOWED available since 7.64.0Florian Smeets2020-01-261-0/+7
| | |
* | | Bump required libcurl version to 7.29.0Christoph M. Becker2020-01-1917-431/+28
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-173-6/+6
| | | | | | | | | | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* | | Fix #78880: Final spelling fixesMáté Kocsis2020-01-161-1/+1
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-082-9/+11
|\ \ \ | |/ / | | | | | | | | | * 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-082-9/+11
| |\ \ | | |/ | | | | | | | | | * 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-082-9/+11
| | | | | | | | | | | | | | | To avoid this, we have to verify the handlers already in `curl_multi_add_handle()`, not only in `curl_multi_exec()`.
| | * Revert "Extend CURLFile to support streams"Christoph M. Becker2020-01-065-146/+1
| | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-081-152/+162
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Extract function
| * | Extract functionChristoph M. Becker2020-01-081-152/+162
| | | | | | | | | | | | | | | | | | As suggested by Nikita[1]. [1] <https://github.com/php/php-src/pull/5045#discussion_r364265013>
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-071-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Make test more resilient
| * | Make test more resilientChristoph M. Becker2020-01-071-1/+1
| | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-062-5/+15
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Don't link against openssl 1.1 in curl
| * | Don't link against openssl 1.1 in curlNikita Popov2020-01-062-5/+15
| | | | | | | | | | | | | | | OpenSSL 1.1 does not need crypto locking callbacks, so avoid detecting and linking against it in the first place.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-063-18/+11
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.4: Fix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH Clean up curl openssl check
| * | Fix bug #79063: Curl openssl does not respect PKG_CONFIG_PATHNikita Popov2020-01-061-4/+5
| | |
| * | Clean up curl openssl checkNikita Popov2020-01-063-14/+6
| | | | | | | | | | | | | | | | | | 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.
* | | Use RETURN_THROWS() after zend_fetch_resource*()Máté Kocsis2020-01-033-27/+27
| | |