summaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
diff options
context:
space:
mode:
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_HTTPHEADER.3')
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTPHEADER.323
1 files changed, 18 insertions, 5 deletions
diff --git a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
index f13b9d331..ac3a0aba3 100644
--- a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
+++ b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
@@ -5,11 +5,11 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, 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
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
@@ -20,14 +20,17 @@
.\" *
.\" **************************************************************************
.\"
-.TH CURLOPT_HTTPHEADER 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTPHEADER 3 "November 26, 2021" "libcurl 7.81.0" "curl_easy_setopt options"
.SH NAME
-CURLOPT_HTTPHEADER \- set custom HTTP headers
+CURLOPT_HTTPHEADER \- set of HTTP headers
.SH SYNOPSIS
+.nf
#include <curl/curl.h>
-CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPHEADER, struct curl_slist *headers);
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPHEADER,
+ struct curl_slist *headers);
+.fi
.SH DESCRIPTION
Pass a pointer to a linked list of HTTP headers to pass to the server and/or
proxy in your HTTP request. The same list can be used for both host and proxy
@@ -69,6 +72,16 @@ The most commonly replaced headers have "shortcuts" in the options
There's an alternative option that sets or replaces headers only for requests
that are sent with CONNECT to a proxy: \fICURLOPT_PROXYHEADER(3)\fP. Use
\fICURLOPT_HEADEROPT(3)\fP to control the behavior.
+.SH SPECIFIC HEADERS
+Setting some specific headers will cause libcurl to act differently.
+.IP "Host:"
+The specified host name will be used for cookie matching if the cookie engine
+is also enabled for this transfer. If the request is done over HTTP/2 or
+HTTP/3, the custom host name will instead be used in the ":authority" header
+field and Host: will not be sent at all over the wire.
+.IP "Transfer-Encoding: chunked"
+Tells libcurl the upload is to be done using this chunked encoding instead of
+providing the Content-Length: field in the request.
.SH SECURITY CONCERNS
By default, this option makes libcurl send the given headers in all HTTP
requests done by this handle. You should therefore use this option with