]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: add --enable-headers-api to enable the headers API
authorDaniel Stenberg <daniel@haxx.se>
Sat, 19 Mar 2022 21:34:19 +0000 (22:34 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 22 Mar 2022 07:24:26 +0000 (08:24 +0100)
Defaults to disabled while labeled EXPERIMENTAL.

Make all the headers API tests require 'headers-api' to run.

12 files changed:
configure.ac
tests/data/test1670
tests/data/test1671
tests/data/test1940
tests/data/test1941
tests/data/test1942
tests/data/test1943
tests/data/test1944
tests/data/test1945
tests/data/test1946
tests/runtests.pl
tests/server/disabled.c

index ed8018155c0396a2f2bf873da4aef7525299cfa3..b5755fb76f9e4ade095d556cfc275ca094340a73 100644 (file)
@@ -165,6 +165,7 @@ curl_verbose_msg="enabled (--disable-verbose)"
    curl_rtmp_msg="no      (--with-librtmp)"
     curl_psl_msg="no      (--with-libpsl)"
  curl_altsvc_msg="enabled (--disable-alt-svc)"
+ curl_headers_msg="no      (--enable-headers-api)"
    curl_hsts_msg="enabled (--disable-hsts)"
     ssl_backends=
      curl_h1_msg="enabled (internal)"
@@ -3931,6 +3932,25 @@ AS_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
        AC_MSG_RESULT(yes)
 )
 
+dnl ************************************************************
+dnl switch on/off headers-api
+dnl
+AC_MSG_CHECKING([whether to support headers-api])
+AC_ARG_ENABLE(headers-api,
+AS_HELP_STRING([--enable-headers-api],[Enable headers-api support])
+AS_HELP_STRING([--disable-headers-api],[Disable headers-api support]),
+[ case "$enableval" in
+  yes)
+       AC_MSG_RESULT(yes)
+       AC_DEFINE(USE_HEADERS_API, 1, [enable headers-api])
+       curl_headers_msg="enabled";
+       ;;
+  *) AC_MSG_RESULT(no)
+       ;;
+  esac ],
+       AC_MSG_RESULT(no)
+)
+
 dnl only check for HSTS if there's SSL present
 if test -n "$SSL_ENABLED"; then
 
@@ -4345,6 +4365,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
   RTMP:             ${curl_rtmp_msg}
   PSL:              ${curl_psl_msg}
   Alt-svc:          ${curl_altsvc_msg}
+  Headers API:      ${curl_headers_msg}
   HSTS:             ${curl_hsts_msg}
   HTTP1:            ${curl_h1_msg}
   HTTP2:            ${curl_h2_msg}
index 51af81a9ab2070f8fc3c146e86f2a3ae517c295e..6d8722f618d184180caca91dfdc5aa894e421926 100644 (file)
@@ -30,6 +30,9 @@ Funny-head: yesyes
 #
 # Client-side
 <client>
+<features>
+headers-api
+</features>
 <server>
 http
 </server>
index ed4169955fedc6cd2f7d49d08515dc8cb5160cdf..ea0dc3e66017f8c90900cd9cb37bd461078c5896 100644 (file)
@@ -33,6 +33,9 @@ Connection: close
 #
 # Client-side
 <client>
+<features>
+headers-api
+</features>
 <server>
 http
 </server>
index 7de6d9371929c3000458fe148c9b7088469e735d..682916b709d3bf478cfa6c4c9c2da6a6e6795842 100644 (file)
@@ -23,6 +23,9 @@ Location: /%TESTNUMBER0002
 
 # Client-side
 <client>
+<features>
+headers-api
+</features>
 <server>
 http
 </server>
index dcefa2818c1ad06f75b8f6fde05c8af2a29d7561..fe3f1de3917ced17b1776ea135ea9d808f21d4e9 100644 (file)
@@ -33,6 +33,7 @@ Silly-thing: yes yes
 <features>
 proxy
 SSL
+headers-api
 </features>
 <server>
 http
index 4a5e1a2e8a1cb06a4269784bfc8d06dfbcf64315..9079800990462e14e7973ab92039c41b6f4ce2cc 100644 (file)
@@ -30,6 +30,7 @@ Location: /%TESTNUMBER0002
 <client>
 <features>
 http
+headers-api
 </features>
 <server>
 http
index 7f44b2ff5a2c5c46f694dbf29fa9e73a27000cfb..194ff111be9d759d71497a9baf94d04bdf1890d3 100644 (file)
@@ -33,6 +33,7 @@ Server: sent-as-trailer
 <client>
 <features>
 http
+headers-api
 </features>
 <server>
 http
index 4c1f5049762fda857b236c197c942413b502becb..3e8ed724cb896aa8fda1a97443a0a67869a77495 100644 (file)
@@ -33,6 +33,9 @@ Set-Cookie: 2cookie=data2;
 
 # Client-side
 <client>
+<features>
+headers-api
+</features>
 <server>
 http
 </server>
index f5c38e441ccef405b9312512850adda314363b75..86fa147adcf0b4c641e1ebcaf9be5efa27174f15 100644 (file)
@@ -33,6 +33,7 @@ Silly-thing: yes yes
 <features>
 proxy
 SSL
+headers-api
 </features>
 <server>
 http
index 4a18cf1c1c9101f0f1a3a12dfdd0951f709d0502..f2f8ecc0506fb745d37b0d40fb010d6d82f5c5a9 100644 (file)
@@ -33,6 +33,9 @@ Set-Cookie: 2cookie=data2;
 
 # Client-side
 <client>
+<features>
+headers-api
+</features>
 <server>
 http
 </server>
index 21fcf66752042adf354d9fa12e574417102d68fe..8afdf8f4bf0999cb5d3bad79bd96f907e0e263ae 100755 (executable)
@@ -2933,6 +2933,7 @@ sub setupfeatures {
     $feature{"typecheck"} = 1;
     $feature{"verbose-strings"} = 1;
     $feature{"wakeup"} = 1;
+    $feature{"headers-api"} = 1;
 
 }
 
index 6f7c10f18033b41ccfc048dbeed3c7dc06c4c81f..5ca5787e40182252bd8f4acbc3b61be5ba8104b1 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -69,6 +69,9 @@ static const char *disabled[]={
 #endif
 #ifndef ENABLE_WAKEUP
   "wakeup",
+#endif
+#ifndef USE_HEADERS_API
+  "headers-api",
 #endif
   NULL
 };