]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
setopt: error on CURLOPT_HTTP09_ALLOWED set true with Hyper
authorDaniel Stenberg <daniel@haxx.se>
Thu, 11 Mar 2021 14:37:14 +0000 (15:37 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 11 Mar 2021 21:45:12 +0000 (22:45 +0100)
Not supported.

Closes #6727

lib/setopt.c

index a1666a4e03c0371a36c22f60ab6965f830c3f1d3..e13bf2e372a94a38c397ec726485fbec99bd4781 100644 (file)
@@ -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 */