summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-12-14 14:10:33 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-18 09:58:04 +0100
commitedc89839be4b70a3e383f77acf9e0e4c19db5de8 (patch)
treed57f52b9b61533d51186d3a96de115f052b2f392 /lib
parent4daba0676265a00a12f1cdf5ef9f0d6ee02761b9 (diff)
downloadcurl-edc89839be4b70a3e383f77acf9e0e4c19db5de8.tar.gz
setopt: adjust to Hyper and disabled HTTP builds
Diffstat (limited to 'lib')
-rw-r--r--lib/setopt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index 58956c1e9..b8fc4e8da 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -274,11 +274,13 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
* Do not include the body part in the output data stream.
*/
data->set.opt_no_body = (0 != va_arg(param, long)) ? TRUE : FALSE;
+#ifndef CURL_DISABLE_HTTP
if(data->set.opt_no_body)
/* in HTTP lingo, no body means using the HEAD request... */
data->set.method = HTTPREQ_HEAD;
else if(data->set.method == HTTPREQ_HEAD)
data->set.method = HTTPREQ_GET;
+#endif
break;
case CURLOPT_FAILONERROR:
/*
@@ -865,7 +867,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
;
else
#endif
-#ifndef USE_NGHTTP2
+#if !defined(USE_NGHTTP2) && !defined(USE_HYPER)
if(arg >= CURL_HTTP_VERSION_2)
return CURLE_UNSUPPORTED_PROTOCOL;
#else