comparison mupdf-source/thirdparty/curl/docs/libcurl/opts/CURLOPT_HEADER.3 @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 .\" **************************************************************************
2 .\" * _ _ ____ _
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at https://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH CURLOPT_HEADER 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
24 .SH NAME
25 CURLOPT_HEADER \- pass headers to the data stream
26 .SH SYNOPSIS
27 #include <curl/curl.h>
28
29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADER, long onoff);
30 .SH DESCRIPTION
31 Pass the long value \fIonoff\fP set to 1 to ask libcurl to include the headers
32 in the write callback (\fICURLOPT_WRITEFUNCTION(3)\fP). This option is
33 relevant for protocols that actually have headers or other meta-data (like
34 HTTP and FTP).
35
36 When asking to get the headers passed to the same callback as the body, it is
37 not possible to accurately separate them again without detailed knowledge
38 about the protocol in use.
39
40 Further: the \fICURLOPT_WRITEFUNCTION(3)\fP callback is limited to only ever
41 get a maximum of \fICURL_MAX_WRITE_SIZE\fP bytes passed to it (16KB), while a
42 header can be longer and the \fICURLOPT_HEADERFUNCTION(3)\fP supports getting
43 called with headers up to \fICURL_MAX_HTTP_HEADER\fP bytes big (100KB).
44
45 It is often better to use \fICURLOPT_HEADERFUNCTION(3)\fP to get the header
46 data separately.
47
48 While named confusingly similar, \fICURLOPT_HTTPHEADER(3)\fP is used to set
49 custom HTTP headers!
50 .SH DEFAULT
51 0
52 .SH PROTOCOLS
53 Most
54 .SH EXAMPLE
55 .nf
56 CURL *curl = curl_easy_init();
57 if(curl) {
58 curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
59
60 curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
61
62 curl_easy_perform(curl);
63 }
64 .fi
65 .SH RETURN VALUE
66 Returns CURLE_OK.
67 .SH "SEE ALSO"
68 .BR CURLOPT_HEADERFUNCTION "(3), "
69 .BR CURLOPT_HTTPHEADER "(3), "