summaryrefslogtreecommitdiff
path: root/lib/doh.c
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2022-07-16 14:10:39 +0000
committerViktor Szakats <commit@vsz.me>2022-07-16 14:10:39 +0000
commita19f0601feb598aa55a644a7b9f32232fea9a51f (patch)
tree71d81c08255be256f75d210be6a8209cc431bf3d /lib/doh.c
parent4c46c829f5ed7c37b3313c67a6662b7332c1ff7f (diff)
downloadcurl-a19f0601feb598aa55a644a7b9f32232fea9a51f.tar.gz
doh: use https protocol by default
The only allowed protocol is https, so it makes sense to use that by default if not passed explicitly by the user. Reported-by: MasterInQuestion on github Reviewed-by: Jay Satiro Fixes #9163 Closes #9165
Diffstat (limited to 'lib/doh.c')
-rw-r--r--lib/doh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/doh.c b/lib/doh.c
index a21c94f88..a86e157fc 100644
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -243,6 +243,7 @@ static CURLcode dohprobe(struct Curl_easy *data,
the gcc typecheck helpers */
struct dynbuf *resp = &p->serverdoh;
ERROR_CHECK_SETOPT(CURLOPT_URL, url);
+ ERROR_CHECK_SETOPT(CURLOPT_DEFAULT_PROTOCOL, "https");
ERROR_CHECK_SETOPT(CURLOPT_WRITEFUNCTION, doh_write_cb);
ERROR_CHECK_SETOPT(CURLOPT_WRITEDATA, resp);
ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDS, p->dohbuffer);