Skip to content

Commit

Permalink
curl: add workaround for CURLOPT_INTERFACE for v8.9-8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
m6w6 committed Aug 27, 2024
1 parent 481e186 commit 9c02949
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/php_http_client_curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,12 @@ static void php_http_curle_options_init(php_http_options_t *registry)
#endif

/* outgoing interface */
php_http_option_register(registry, ZEND_STRL("interface"), CURLOPT_INTERFACE, IS_STRING);
if ((opt = php_http_option_register(registry, ZEND_STRL("interface"), CURLOPT_INTERFACE, IS_STRING))) {
#if PHP_HTTP_CURL_VERSION(8,9,0) && !PHP_HTTP_CURL_VERSION(8,10,0)
// NULL support lost in v8.9 and restored in libcurl v8.10
opt->flags |= PHP_HTTP_CURLE_OPTION_IGNORE_RC;
#endif
}
if ((opt = php_http_option_register(registry, ZEND_STRL("portrange"), CURLOPT_LOCALPORT, IS_ARRAY))) {
opt->setter = php_http_curle_option_set_portrange;
}
Expand Down

0 comments on commit 9c02949

Please sign in to comment.