mirror of
https://github.com/curl/curl.git
synced 2026-07-23 06:27:17 +03:00
Curl_add_custom_headers: support headers with no data
A custom HTTP header ending in a semicolon instead of a colon will be treated as a header to be added without any data portion.
This commit is contained in:
parent
6790a543d4
commit
aff70e2e95
4 changed files with 34 additions and 4 deletions
|
|
@ -592,7 +592,9 @@ header will be used instead of the internal one. This allows you to make even
|
|||
trickier stuff than curl would normally do. You should not replace internally
|
||||
set headers without knowing perfectly well what you're doing. Remove an
|
||||
internal header by giving a replacement without content on the right side of
|
||||
the colon, as in: -H \&"Host:".
|
||||
the colon, as in: -H \&"Host:". If you send the custom header with no-value then
|
||||
its header must be terminated with a semicolon, such as \-H "X-Custom-Header;"
|
||||
to send "X-Custom-Header:".
|
||||
|
||||
curl will make sure that each header you add/replace is sent with the proper
|
||||
end-of-line marker, you should thus \fBnot\fP add that as a part of the header
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue