summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-03-11 15:37:14 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-03-11 22:45:12 +0100
commit32a71333d4dff782fbf6be8b48e04e1aa1e0450b (patch)
tree3afdde087c035afe1b8bbf8a6d65386fde1c8460
parent25837e32b0383694b79e6913fa38f5e7e9b0ae65 (diff)
downloadcurl-32a71333d4dff782fbf6be8b48e04e1aa1e0450b.tar.gz
setopt: error on CURLOPT_HTTP09_ALLOWED set true with Hyper
Not supported. Closes #6727
-rw-r--r--lib/setopt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index a1666a4e0..e13bf2e37 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -906,7 +906,13 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
arg = va_arg(param, unsigned long);
if(arg > 1L)
return CURLE_BAD_FUNCTION_ARGUMENT;
+#ifdef USE_HYPER
+ /* Hyper does not support HTTP/0.9 */
+ if(arg)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+#else
data->set.http09_allowed = arg ? TRUE : FALSE;
+#endif
break;
#endif /* CURL_DISABLE_HTTP */