disable protocol guesswork (HTTP or HTTPS must be explicitly specified in the URL) v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue, 15 Mar 2022 23:58:27 +0100
branchv_0
changeset 13 18f4f7e93c48
parent 12 2f2d64333867
child 14 e41abdd36ff1
disable protocol guesswork (HTTP or HTTPS must be explicitly specified in the URL)
src/HTTPClient.cpp
--- a/src/HTTPClient.cpp	Tue Mar 15 23:49:33 2022 +0100
+++ b/src/HTTPClient.cpp	Tue Mar 15 23:58:27 2022 +0100
@@ -116,6 +116,9 @@
 	// enable HTTP and HTTPS only
 	curl_easy_setopt(impl->curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
 
+	// disable protocol guesswork
+	curl_easy_setopt(impl->curl, CURLOPT_DEFAULT_PROTOCOL, "no-default-protocol-specify-http-or-https-explicitly-in-url");
+
 	return new HTTPClient(impl);
 }