mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 00:58:48 -05:00
setopt: adjust to Hyper and disabled HTTP builds
This commit is contained in:
parent
4daba06762
commit
edc89839be
@ -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.
|
* Do not include the body part in the output data stream.
|
||||||
*/
|
*/
|
||||||
data->set.opt_no_body = (0 != va_arg(param, long)) ? TRUE : FALSE;
|
data->set.opt_no_body = (0 != va_arg(param, long)) ? TRUE : FALSE;
|
||||||
|
#ifndef CURL_DISABLE_HTTP
|
||||||
if(data->set.opt_no_body)
|
if(data->set.opt_no_body)
|
||||||
/* in HTTP lingo, no body means using the HEAD request... */
|
/* in HTTP lingo, no body means using the HEAD request... */
|
||||||
data->set.method = HTTPREQ_HEAD;
|
data->set.method = HTTPREQ_HEAD;
|
||||||
else if(data->set.method == HTTPREQ_HEAD)
|
else if(data->set.method == HTTPREQ_HEAD)
|
||||||
data->set.method = HTTPREQ_GET;
|
data->set.method = HTTPREQ_GET;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case CURLOPT_FAILONERROR:
|
case CURLOPT_FAILONERROR:
|
||||||
/*
|
/*
|
||||||
@ -865,7 +867,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||||||
;
|
;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#ifndef USE_NGHTTP2
|
#if !defined(USE_NGHTTP2) && !defined(USE_HYPER)
|
||||||
if(arg >= CURL_HTTP_VERSION_2)
|
if(arg >= CURL_HTTP_VERSION_2)
|
||||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user