From 9f7925b60208079c1681d67f1cb46b6fd2b282a6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 25 May 2022 09:31:55 +0200 Subject: [PATCH] headers api: remove EXPERIMENTAL tag Closes #8900 --- configure.ac | 12 ++++++------ docs/CURL-DISABLE.md | 4 ++++ docs/EXPERIMENTAL.md | 1 - docs/libcurl/curl_easy_header.3 | 4 +--- docs/libcurl/curl_easy_nextheader.3 | 4 +--- lib/headers.c | 2 +- lib/headers.h | 2 +- tests/server/disabled.c | 2 +- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index f89c266c9b9e6d..1300a7189de072 100644 --- a/configure.ac +++ b/configure.ac @@ -165,7 +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_headers_msg="enabled (--disable-headers-api)" curl_hsts_msg="enabled (--disable-hsts)" ssl_backends= curl_h1_msg="enabled (internal)" @@ -4016,15 +4016,15 @@ 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) + no) AC_MSG_RESULT(no) + curl_headers_msg="no (--enable-headers-api)" + AC_DEFINE(CURL_DISABLE_HEADERS_API, 1, [disable headers-api]) ;; esac ], - AC_MSG_RESULT(no) + AC_MSG_RESULT(yes) ) dnl only check for HSTS if there's SSL present diff --git a/docs/CURL-DISABLE.md b/docs/CURL-DISABLE.md index a2e75f198db51b..7ece3dc51ff200 100644 --- a/docs/CURL-DISABLE.md +++ b/docs/CURL-DISABLE.md @@ -37,6 +37,10 @@ about existing options to `curl_easy_setopt`. Disable the GOPHER protocol. +## CURL_DISABLE_HEADERS_API + +Disable the HTTP header API. + ## CURL_DISABLE_HSTS Disable the HTTP Strict Transport Security support. diff --git a/docs/EXPERIMENTAL.md b/docs/EXPERIMENTAL.md index 06deb5fc93494b..38bc620374ea1a 100644 --- a/docs/EXPERIMENTAL.md +++ b/docs/EXPERIMENTAL.md @@ -21,4 +21,3 @@ Experimental support in curl means: - The Hyper HTTP backend - HTTP/3 support and options - `CURLSSLOPT_NATIVE_CA` (No configure option, feature built in when supported) - - The headers API: `curl_easy_header` and `curl_easy_nextheader`. diff --git a/docs/libcurl/curl_easy_header.3 b/docs/libcurl/curl_easy_header.3 index 9aaa9d767cbd69..f5e2aab59b114c 100644 --- a/docs/libcurl/curl_easy_header.3 +++ b/docs/libcurl/curl_easy_header.3 @@ -33,8 +33,6 @@ CURLHcode curl_easy_header(CURL *easy, int request, struct curl_header **hout); .SH DESCRIPTION -EXPERIMENTAL feature! - \fIcurl_easy_header(3)\fP returns a pointer to a "curl_header" struct in \fBhout\fP with data for the HTTP response header \fIname\fP. The case insensitive nul-terminated header name should be specified without colon. @@ -131,7 +129,7 @@ CURLHcode h = curl_easy_header(easy, "Content-Type", 0, CURLH_HEADER, -1, &type); .fi .SH AVAILABILITY -Added in 7.83.0 +Added in 7.83.0. Officially supported since 7.84.0. .SH RETURN VALUE This function returns a CURLHcode indicating success or error. .IP "CURLHE_BADINDEX (1)" diff --git a/docs/libcurl/curl_easy_nextheader.3 b/docs/libcurl/curl_easy_nextheader.3 index 51ffbdc81dd03e..8758bbb58f0d93 100644 --- a/docs/libcurl/curl_easy_nextheader.3 +++ b/docs/libcurl/curl_easy_nextheader.3 @@ -32,8 +32,6 @@ struct curl_header *curl_easy_nextheader(CURL *easy, struct curl_header *prev); .fi .SH DESCRIPTION -EXPERIMENTAL feature! - This function lets an application iterate over all previously received HTTP headers. @@ -85,7 +83,7 @@ while((h = curl_easy_nextheader(easy, origin, -1, prev))) { } .fi .SH AVAILABILITY -Added in 7.83.0 +Added in 7.83.0. Officially supported since 7.84.0. .SH RETURN VALUE This function returns the next header, or NULL when there are no more (matching) headers or an error occurred. diff --git a/lib/headers.c b/lib/headers.c index b83557d77cc1a5..542f265217a144 100644 --- a/lib/headers.c +++ b/lib/headers.c @@ -32,7 +32,7 @@ #include "curl_memory.h" #include "memdebug.h" -#if !defined(CURL_DISABLE_HTTP) && defined(USE_HEADERS_API) +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_HEADERS_API) /* Generate the curl_header struct for the user. This function MUST assign all struct fields in the output struct. */ diff --git a/lib/headers.h b/lib/headers.h index 48c013b04dc6e8..469df7279407fe 100644 --- a/lib/headers.h +++ b/lib/headers.h @@ -23,7 +23,7 @@ ***************************************************************************/ #include "curl_setup.h" -#if !defined(CURL_DISABLE_HTTP) && defined(USE_HEADERS_API) +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_HEADERS_API) struct Curl_header_store { struct Curl_llist_element node; diff --git a/tests/server/disabled.c b/tests/server/disabled.c index 5ca5787e401822..c0410761e84a71 100644 --- a/tests/server/disabled.c +++ b/tests/server/disabled.c @@ -70,7 +70,7 @@ static const char *disabled[]={ #ifndef ENABLE_WAKEUP "wakeup", #endif -#ifndef USE_HEADERS_API +#ifdef CURL_DISABLE_HEADERS_API "headers-api", #endif NULL