From 84b9458837551a2749b45d924089f2015415a324 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 15 Jun 2017 11:08:31 +0200 Subject: curl: allow --header and --proxy-header read from file So many headers can be provided as @filename. Suggested-by: Timothe Litt Closes #1486 --- docs/cmdline-opts/header.d | 9 ++++++--- docs/cmdline-opts/proxy-header.d | 8 ++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'docs/cmdline-opts') diff --git a/docs/cmdline-opts/header.d b/docs/cmdline-opts/header.d index 90af7359e..d8292ed77 100644 --- a/docs/cmdline-opts/header.d +++ b/docs/cmdline-opts/header.d @@ -1,10 +1,9 @@ Long: header Short: H -Arg:
-Help: Pass custom header LINE to server +Arg:
+Help: Pass custom header(s) to server Protocols: HTTP --- - Extra header to include in the request when sending HTTP to a server. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your @@ -21,6 +20,10 @@ end-of-line marker, you should thus \fBnot\fP add that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you. +Starting in 7.55.0, this option can take an argument in @filename style, which +then adds a header for each line in the input file. Using @- will make curl +read the header file from stdin. + See also the --user-agent and --referer options. Starting in 7.37.0, you need --proxy-header to send custom headers intended diff --git a/docs/cmdline-opts/proxy-header.d b/docs/cmdline-opts/proxy-header.d index 1ef696bc7..c1b0bb7c4 100644 --- a/docs/cmdline-opts/proxy-header.d +++ b/docs/cmdline-opts/proxy-header.d @@ -1,6 +1,6 @@ Long: proxy-header -Arg:
-Help: Pass custom header LINE to proxy +Arg:
+Help: Pass custom header(s) to proxy Protocols: HTTP Added: 7.37.0 --- @@ -17,4 +17,8 @@ up for you. Headers specified with this option will not be included in requests that curl knows will not be sent to a proxy. +Starting in 7.55.0, this option can take an argument in @filename style, which +then adds a header for each line in the input file. Using @- will make curl +read the header file from stdin. + This option can be used multiple times to add/replace/remove multiple headers. -- cgit v1.2.3