doh: make sure CURLOPT_PROTOCOLS is set a with a "long" arg

Closes #17142
This commit is contained in:
Daniel Stenberg 2025-04-23 08:19:56 +02:00
parent 3394644325
commit b993f2871b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -348,10 +348,10 @@ static CURLcode doh_probe_run(struct Curl_easy *data,
#endif
#ifndef DEBUGBUILD
/* enforce HTTPS if not debug */
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, (long)CURLPROTO_HTTPS);
#else
/* in debug mode, also allow http */
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, (long)CURLPROTO_HTTP|CURLPROTO_HTTPS);
#endif
ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
ERROR_CHECK_SETOPT(CURLOPT_SHARE, (CURLSH *)data->share);