Skip to content

Commit 9e5e9af

Browse files
committed
Curl: Add CURLOPT_DOH_URL option
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.
1 parent 2d0dd4d commit 9e5e9af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/curl/interface.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,10 @@ PHP_MINIT_FUNCTION(curl)
11411141
REGISTER_CURL_CONSTANT(CURLOPT_TLS13_CIPHERS);
11421142
#endif
11431143

1144+
#if LIBCURL_VERSION_NUM >= 0x073E00 /* Available since 7.62.0 */
1145+
REGISTER_CURL_CONSTANT(CURLOPT_DOH_URL);
1146+
#endif
1147+
11441148
#if LIBCURL_VERSION_NUM >= 0x074000 /* Available since 7.64.0 */
11451149
REGISTER_CURL_CONSTANT(CURLOPT_HTTP09_ALLOWED);
11461150
#endif
@@ -2449,6 +2453,9 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
24492453
#endif
24502454
#if LIBCURL_VERSION_NUM >= 0x072800 /* Available since 7.40.0 */
24512455
case CURLOPT_UNIX_SOCKET_PATH:
2456+
#endif
2457+
#if LIBCURL_VERSION_NUM >= 0x073E00 /* Available since 7.62.0 */
2458+
case CURLOPT_DOH_URL:
24522459
#endif
24532460
case CURLOPT_KRBLEVEL:
24542461
{

0 commit comments

Comments
 (0)