xref: /aosp_15_r20/external/curl/docs/cmdline-opts/dump-header.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: dump-header
5*6236dae4SAndroid Build Coastguard WorkerShort: D
6*6236dae4SAndroid Build Coastguard WorkerArg: <filename>
7*6236dae4SAndroid Build Coastguard WorkerHelp: Write the received headers to <filename>
8*6236dae4SAndroid Build Coastguard WorkerProtocols: HTTP FTP
9*6236dae4SAndroid Build Coastguard WorkerCategory: http ftp
10*6236dae4SAndroid Build Coastguard WorkerAdded: 5.7
11*6236dae4SAndroid Build Coastguard WorkerMulti: single
12*6236dae4SAndroid Build Coastguard WorkerSee-also:
13*6236dae4SAndroid Build Coastguard Worker  - output
14*6236dae4SAndroid Build Coastguard WorkerExample:
15*6236dae4SAndroid Build Coastguard Worker  - --dump-header store.txt $URL
16*6236dae4SAndroid Build Coastguard Worker  - --dump-header - $URL -o save
17*6236dae4SAndroid Build Coastguard Worker---
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard Worker# `--dump-header`
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard WorkerWrite the received protocol headers to the specified file. If no headers are
22*6236dae4SAndroid Build Coastguard Workerreceived, the use of this option creates an empty file. Specify `-` as
23*6236dae4SAndroid Build Coastguard Workerfilename (a single minus) to have it written to stdout.
24*6236dae4SAndroid Build Coastguard Worker
25*6236dae4SAndroid Build Coastguard WorkerStarting in curl 8.10.0, specify `%` (a single percent sign) as filename
26*6236dae4SAndroid Build Coastguard Workerwrites the output to stderr.
27*6236dae4SAndroid Build Coastguard Worker
28*6236dae4SAndroid Build Coastguard WorkerWhen used in FTP, the FTP server response lines are considered being "headers"
29*6236dae4SAndroid Build Coastguard Workerand thus are saved there.
30*6236dae4SAndroid Build Coastguard Worker
31*6236dae4SAndroid Build Coastguard WorkerStarting in curl 8.11.0, using the --create-dirs option can also create
32*6236dae4SAndroid Build Coastguard Workermissing directory components for the path provided in --dump-header.
33*6236dae4SAndroid Build Coastguard Worker
34*6236dae4SAndroid Build Coastguard WorkerHaving multiple transfers in one set of operations (i.e. the URLs in one
35*6236dae4SAndroid Build Coastguard Worker--next clause), appends them to the same file, separated by a blank line.
36