mirror of
https://github.com/curl/curl.git
synced 2025-09-17 17:42:49 +03:00
parent
739275a1d9
commit
4d94fac9f0
12
configure.ac
12
configure.ac
|
@ -165,7 +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_headers_msg="enabled (--disable-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)"
|
||||||
|
@ -4016,15 +4016,15 @@ AC_ARG_ENABLE(headers-api,
|
||||||
AS_HELP_STRING([--enable-headers-api],[Enable headers-api support])
|
AS_HELP_STRING([--enable-headers-api],[Enable headers-api support])
|
||||||
AS_HELP_STRING([--disable-headers-api],[Disable headers-api support]),
|
AS_HELP_STRING([--disable-headers-api],[Disable headers-api support]),
|
||||||
[ case "$enableval" in
|
[ case "$enableval" in
|
||||||
yes)
|
*)
|
||||||
AC_MSG_RESULT(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 ],
|
esac ],
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(yes)
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl only check for HSTS if there's SSL present
|
dnl only check for HSTS if there's SSL present
|
||||||
|
|
|
@ -37,6 +37,10 @@ about existing options to `curl_easy_setopt`.
|
||||||
|
|
||||||
Disable the GOPHER protocol.
|
Disable the GOPHER protocol.
|
||||||
|
|
||||||
|
## CURL_DISABLE_HEADERS_API
|
||||||
|
|
||||||
|
Disable the HTTP header API.
|
||||||
|
|
||||||
## CURL_DISABLE_HSTS
|
## CURL_DISABLE_HSTS
|
||||||
|
|
||||||
Disable the HTTP Strict Transport Security support.
|
Disable the HTTP Strict Transport Security support.
|
||||||
|
|
|
@ -21,4 +21,3 @@ Experimental support in curl means:
|
||||||
- The Hyper HTTP backend
|
- The Hyper HTTP backend
|
||||||
- HTTP/3 support and options
|
- HTTP/3 support and options
|
||||||
- `CURLSSLOPT_NATIVE_CA` (No configure option, feature built in when supported)
|
- `CURLSSLOPT_NATIVE_CA` (No configure option, feature built in when supported)
|
||||||
- The headers API: `curl_easy_header` and `curl_easy_nextheader`.
|
|
||||||
|
|
|
@ -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
|
The output will be written to standard output, but this can be switched to
|
||||||
standard error by using %{stderr}.
|
standard error by using %{stderr}.
|
||||||
|
|
||||||
EXPERIMENTAL feature: Output HTTP headers from the most recent request by
|
Output HTTP headers from the most recent request by using \fB%header{name}\fP
|
||||||
using \fB%header{name}\fP where \fBname\fP is the case insensitive name of the
|
where \fBname\fP is the case insensitive name of the header (without the
|
||||||
header (without the trailing colon). The header contents are exactly as sent
|
trailing colon). The header contents are exactly as sent over the network,
|
||||||
over the network, with leading and trailing whitespace trimmed. Added in curl
|
with leading and trailing whitespace trimmed. Added in curl 7.84.0.
|
||||||
7.83.0.
|
|
||||||
|
|
||||||
.B NOTE:
|
.B NOTE:
|
||||||
The %-symbol is a special symbol in the win32-environment, where all
|
The %-symbol is a special symbol in the win32-environment, where all
|
||||||
|
@ -55,8 +54,6 @@ The initial path curl ended up in when logging on to the remote FTP
|
||||||
server. (Added in 7.15.4)
|
server. (Added in 7.15.4)
|
||||||
.TP
|
.TP
|
||||||
.B header_json
|
.B header_json
|
||||||
EXPERIMENTAL feature.
|
|
||||||
|
|
||||||
A JSON object with all HTTP response headers from the recent transfer. Values
|
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
|
are provided as arrays, since in the case of multiple headers there can be
|
||||||
multiple values.
|
multiple values.
|
||||||
|
|
|
@ -33,8 +33,6 @@ CURLHcode curl_easy_header(CURL *easy,
|
||||||
int request,
|
int request,
|
||||||
struct curl_header **hout);
|
struct curl_header **hout);
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
EXPERIMENTAL feature!
|
|
||||||
|
|
||||||
\fIcurl_easy_header(3)\fP returns a pointer to a "curl_header" struct in
|
\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
|
\fBhout\fP with data for the HTTP response header \fIname\fP. The case
|
||||||
insensitive nul-terminated header name should be specified without colon.
|
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);
|
curl_easy_header(easy, "Content-Type", 0, CURLH_HEADER, -1, &type);
|
||||||
.fi
|
.fi
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
Added in 7.83.0
|
Added in 7.83.0. Officially supported since 7.84.0.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
This function returns a CURLHcode indicating success or error.
|
This function returns a CURLHcode indicating success or error.
|
||||||
.IP "CURLHE_BADINDEX (1)"
|
.IP "CURLHE_BADINDEX (1)"
|
||||||
|
|
|
@ -32,8 +32,6 @@ struct curl_header *curl_easy_nextheader(CURL *easy,
|
||||||
struct curl_header *prev);
|
struct curl_header *prev);
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
EXPERIMENTAL feature!
|
|
||||||
|
|
||||||
This function lets an application iterate over all previously received HTTP
|
This function lets an application iterate over all previously received HTTP
|
||||||
headers.
|
headers.
|
||||||
|
|
||||||
|
@ -85,7 +83,7 @@ while((h = curl_easy_nextheader(easy, origin, -1, prev))) {
|
||||||
}
|
}
|
||||||
.fi
|
.fi
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
Added in 7.83.0
|
Added in 7.83.0. Officially supported since 7.84.0.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
This function returns the next header, or NULL when there are no more
|
This function returns the next header, or NULL when there are no more
|
||||||
(matching) headers or an error occurred.
|
(matching) headers or an error occurred.
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "curl_memory.h"
|
#include "curl_memory.h"
|
||||||
#include "memdebug.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
|
/* Generate the curl_header struct for the user. This function MUST assign all
|
||||||
struct fields in the output struct. */
|
struct fields in the output struct. */
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "curl_setup.h"
|
#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_header_store {
|
||||||
struct Curl_llist_element node;
|
struct Curl_llist_element node;
|
||||||
|
|
|
@ -70,7 +70,7 @@ static const char *disabled[]={
|
||||||
#ifndef ENABLE_WAKEUP
|
#ifndef ENABLE_WAKEUP
|
||||||
"wakeup",
|
"wakeup",
|
||||||
#endif
|
#endif
|
||||||
#ifndef USE_HEADERS_API
|
#ifdef CURL_DISABLE_HEADERS_API
|
||||||
"headers-api",
|
"headers-api",
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
|
|
Loading…
Reference in New Issue
Block a user