configure: add --enable-headers-api to enable the headers API
Defaults to disabled while labeled EXPERIMENTAL. Make all the headers API tests require 'headers-api' to run.
This commit is contained in:
parent
160b640a8b
commit
7c8c723682
21
configure.ac
21
configure.ac
@ -165,6 +165,7 @@ curl_verbose_msg="enabled (--disable-verbose)"
|
|||||||
curl_rtmp_msg="no (--with-librtmp)"
|
curl_rtmp_msg="no (--with-librtmp)"
|
||||||
curl_psl_msg="no (--with-libpsl)"
|
curl_psl_msg="no (--with-libpsl)"
|
||||||
curl_altsvc_msg="enabled (--disable-alt-svc)"
|
curl_altsvc_msg="enabled (--disable-alt-svc)"
|
||||||
|
curl_headers_msg="no (--enable-headers-api)"
|
||||||
curl_hsts_msg="enabled (--disable-hsts)"
|
curl_hsts_msg="enabled (--disable-hsts)"
|
||||||
ssl_backends=
|
ssl_backends=
|
||||||
curl_h1_msg="enabled (internal)"
|
curl_h1_msg="enabled (internal)"
|
||||||
@ -3931,6 +3932,25 @@ AS_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
|
|||||||
AC_MSG_RESULT(yes)
|
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
|
dnl only check for HSTS if there's SSL present
|
||||||
if test -n "$SSL_ENABLED"; then
|
if test -n "$SSL_ENABLED"; then
|
||||||
|
|
||||||
@ -4345,6 +4365,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
|||||||
RTMP: ${curl_rtmp_msg}
|
RTMP: ${curl_rtmp_msg}
|
||||||
PSL: ${curl_psl_msg}
|
PSL: ${curl_psl_msg}
|
||||||
Alt-svc: ${curl_altsvc_msg}
|
Alt-svc: ${curl_altsvc_msg}
|
||||||
|
Headers API: ${curl_headers_msg}
|
||||||
HSTS: ${curl_hsts_msg}
|
HSTS: ${curl_hsts_msg}
|
||||||
HTTP1: ${curl_h1_msg}
|
HTTP1: ${curl_h1_msg}
|
||||||
HTTP2: ${curl_h2_msg}
|
HTTP2: ${curl_h2_msg}
|
||||||
|
|||||||
@ -30,6 +30,9 @@ Funny-head: yesyes
|
|||||||
#
|
#
|
||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
|
<features>
|
||||||
|
headers-api
|
||||||
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
</server>
|
</server>
|
||||||
|
|||||||
@ -33,6 +33,9 @@ Connection: close
|
|||||||
#
|
#
|
||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
|
<features>
|
||||||
|
headers-api
|
||||||
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
</server>
|
</server>
|
||||||
|
|||||||
@ -23,6 +23,9 @@ Location: /%TESTNUMBER0002
|
|||||||
|
|
||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
|
<features>
|
||||||
|
headers-api
|
||||||
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
</server>
|
</server>
|
||||||
|
|||||||
@ -33,6 +33,7 @@ Silly-thing: yes yes
|
|||||||
<features>
|
<features>
|
||||||
proxy
|
proxy
|
||||||
SSL
|
SSL
|
||||||
|
headers-api
|
||||||
</features>
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
|
|||||||
@ -30,6 +30,7 @@ Location: /%TESTNUMBER0002
|
|||||||
<client>
|
<client>
|
||||||
<features>
|
<features>
|
||||||
http
|
http
|
||||||
|
headers-api
|
||||||
</features>
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
|
|||||||
@ -33,6 +33,7 @@ Server: sent-as-trailer
|
|||||||
<client>
|
<client>
|
||||||
<features>
|
<features>
|
||||||
http
|
http
|
||||||
|
headers-api
|
||||||
</features>
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
|
|||||||
@ -33,6 +33,9 @@ Set-Cookie: 2cookie=data2;
|
|||||||
|
|
||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
|
<features>
|
||||||
|
headers-api
|
||||||
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
</server>
|
</server>
|
||||||
|
|||||||
@ -33,6 +33,7 @@ Silly-thing: yes yes
|
|||||||
<features>
|
<features>
|
||||||
proxy
|
proxy
|
||||||
SSL
|
SSL
|
||||||
|
headers-api
|
||||||
</features>
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
|
|||||||
@ -33,6 +33,9 @@ Set-Cookie: 2cookie=data2;
|
|||||||
|
|
||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
|
<features>
|
||||||
|
headers-api
|
||||||
|
</features>
|
||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
</server>
|
</server>
|
||||||
|
|||||||
@ -2933,6 +2933,7 @@ sub setupfeatures {
|
|||||||
$feature{"typecheck"} = 1;
|
$feature{"typecheck"} = 1;
|
||||||
$feature{"verbose-strings"} = 1;
|
$feature{"verbose-strings"} = 1;
|
||||||
$feature{"wakeup"} = 1;
|
$feature{"wakeup"} = 1;
|
||||||
|
$feature{"headers-api"} = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -69,6 +69,9 @@ static const char *disabled[]={
|
|||||||
#endif
|
#endif
|
||||||
#ifndef ENABLE_WAKEUP
|
#ifndef ENABLE_WAKEUP
|
||||||
"wakeup",
|
"wakeup",
|
||||||
|
#endif
|
||||||
|
#ifndef USE_HEADERS_API
|
||||||
|
"headers-api",
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user