[php-src] PR #16790: ext/curl: Fix `CURLOPT_PREREQFUNCTION` to not continue on error conditions
| From: | Ayesh | Date: | Thu, 14 Nov 2024 05:04:17 +0000 |
| Subject: | [php-src] PR #16790: ext/curl: Fix `CURLOPT_PREREQFUNCTION` to not continue on error conditions | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-29636@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/16790
Author: Ayesh
This is a follow-up to GH-13255.
When the
CURLOPT_PREREQFUNCTION callback does not return any value or return an invalid
value, we throw a ValueError or a TypeError exception. However, it does
not prevent the Curl request from going forward because our default return value is
CURL_PREREQFUNC_OK.
This changes the default value to CURL_PREREQFUNC_ABORT.