mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:23:34 +03:00
http: handle user-defined connection headers
When there is more than one user-supplied 'Connection: ' header, add values that curl needs internally to the first one and emit all subsequent ones thereafter. Fixes #18662 Reported-by: Evgeny Grin (Karlson2k) Closes #18686
This commit is contained in:
parent
500ea90829
commit
061e265502
4 changed files with 132 additions and 11 deletions
|
|
@ -55,6 +55,10 @@ without content (no data on the right side of the colon) as in `Accept:`, the
|
|||
internally used header is removed. To forcibly add a header without content
|
||||
(nothing after the colon), use the form `name;` (using a trailing semicolon).
|
||||
|
||||
There are exceptions when suppressing headers. The `Connection:` header in
|
||||
HTTP/1.1 cannot be overridden. You can provide values for it, but should a
|
||||
request require specific ones, they are always added to your own.
|
||||
|
||||
The headers included in the linked list **must not** be CRLF-terminated, since
|
||||
libcurl adds CRLF after each header item itself. Failure to comply with this
|
||||
might result in strange behavior. libcurl passes on the verbatim strings you
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue