Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

headers api: remove EXPERIMENTAL tag #8900

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .cirrus.yml
Expand Up @@ -84,14 +84,14 @@ windows_task:
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
container_cmd: C:\msys64\usr\bin\sh
prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --enable-headers-api
configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
tests: "~571"
- name: Windows 32-bit static/release Schannel/SSPI/WinIDN/libssh2
env:
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
container_cmd: C:\msys64\usr\bin\sh
prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --disable-shared --enable-static --enable-headers-api
configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --disable-shared --enable-static
tests: "~571"
curl_LDFLAGS: -all-static
PKG_CONFIG: pkg-config --static
Expand All @@ -100,14 +100,14 @@ windows_task:
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
container_cmd: C:\msys64\usr\bin\sh
prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --enable-headers-api
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
tests: "~571"
- name: Windows 64-bit static/release Schannel/SSPI/WinIDN/libssh2
env:
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
container_cmd: C:\msys64\usr\bin\sh
prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --disable-shared --enable-static --enable-headers-api
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --disable-shared --enable-static
tests: "~571"
curl_LDFLAGS: -all-static
PKG_CONFIG: pkg-config --static
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bearssl.yml
Expand Up @@ -49,7 +49,7 @@ jobs:
- run: autoreconf -fi
name: 'autoreconf'

- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-headers-api
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
name: 'configure'

- run: make V=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-hyper.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
build:
- name: hyper
install:
configure: LDFLAGS="-Wl,-rpath,$HOME/hyper/target/debug" --with-openssl --with-hyper=$HOME/hyper --enable-debug --enable-headers-api
configure: LDFLAGS="-Wl,-rpath,$HOME/hyper/target/debug" --with-openssl --with-hyper=$HOME/hyper --enable-debug

steps:
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Expand Up @@ -92,7 +92,7 @@ jobs:
- run: autoreconf -fi
name: 'autoreconf'

- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-headers-api
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
name: 'configure'
env:
# -Wvla is caused by brotli
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mbedtls.yml
Expand Up @@ -46,7 +46,7 @@ jobs:
- run: autoreconf -fi
name: 'autoreconf'

- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-headers-api
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
name: 'configure'

- run: make V=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msh3.yml
Expand Up @@ -52,7 +52,7 @@ jobs:
- run: autoreconf -fi
name: 'autoreconf'

- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-headers-api
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
name: 'configure'

- run: make V=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nss.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
build:
- name: NSS
install: clang-9 libnss3-dev libpsl-dev libbrotli-dev libzstd-dev libnghttp2-dev nss-plugin-pem
configure: CC=clang-9 CPPFLAGS="-isystem /usr/include/nss" --with-nss --enable-debug --with-nss-deprecated --enable-headers-api
configure: CC=clang-9 CPPFLAGS="-isystem /usr/include/nss" --with-nss --enable-debug --with-nss-deprecated

steps:
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openssl3.yml
Expand Up @@ -46,7 +46,7 @@ jobs:
- run: autoreconf -fi
name: 'autoreconf'

- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-headers-api
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
name: 'configure'

- run: make V=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rustls.yml
Expand Up @@ -45,7 +45,7 @@ jobs:
- run: autoreconf -fi
name: 'autoreconf'

- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-headers-api
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
name: 'configure'

- run: make V=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wolfssl.yml
Expand Up @@ -50,7 +50,7 @@ jobs:
- run: autoreconf -fi
name: 'autoreconf'

- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-headers-api
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
name: 'configure'

- run: make V=1
Expand Down
12 changes: 6 additions & 6 deletions configure.ac
Expand Up @@ -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)"
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions docs/CURL-DISABLE.md
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion docs/EXPERIMENTAL.md
Expand Up @@ -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`.
11 changes: 4 additions & 7 deletions docs/cmdline-opts/write-out.d
Expand Up @@ -22,11 +22,10 @@ output a newline by using \\n, a carriage return with \\r and a tab space with
The output will be written to standard output, but this can be switched to
standard error by using %{stderr}.

EXPERIMENTAL feature: Output HTTP headers from the most recent request by
using \fB%header{name}\fP where \fBname\fP is the case insensitive name of the
header (without the trailing colon). The header contents are exactly as sent
over the network, with leading and trailing whitespace trimmed. Added in curl
7.83.0.
Output HTTP headers from the most recent request by using \fB%header{name}\fP
where \fBname\fP is the case insensitive name of the header (without the
trailing colon). The header contents are exactly as sent over the network,
with leading and trailing whitespace trimmed. Added in curl 7.84.0.

.B NOTE:
The %-symbol is a special symbol in the win32-environment, where all
Expand Down Expand Up @@ -55,8 +54,6 @@ The initial path curl ended up in when logging on to the remote FTP
server. (Added in 7.15.4)
.TP
.B header_json
EXPERIMENTAL feature.

A JSON object with all HTTP response headers from the recent transfer. Values
are provided as arrays, since in the case of multiple headers there can be
multiple values.
Expand Down
4 changes: 1 addition & 3 deletions docs/libcurl/curl_easy_header.3
Expand Up @@ -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.
Expand Down Expand Up @@ -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)"
Expand Down
4 changes: 1 addition & 3 deletions docs/libcurl/curl_easy_nextheader.3
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/headers.c
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion lib/headers.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/server/disabled.c
Expand Up @@ -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
Expand Down