http: restore header folding behavior

Folded header lines will now get passed through like before. The headers
API is adapted and will provide the content unfolded.

Added test 1274 and extended test 1940 to verify.

Reported-by: Petr Pisar
Fixes #8844
Closes #8899
This commit is contained in:
Daniel Stenberg 2022-05-24 23:33:35 +02:00
parent 16a58e9f93
commit c9b60f0053
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
8 changed files with 139 additions and 9 deletions

View file

@ -94,7 +94,9 @@ but it might have a different case.
The data \fBvalue\fP field points to, comes exactly as delivered over the
network but with leading and trailing whitespace and newlines stripped
off. The `value` data is nul-terminated.
off. The `value` data is nul-terminated. For legacy HTTP/1 "folded headers",
this API provides the full single value in an unfolded manner with a single
whitespace between the lines.
\fBamount\fP is how many headers using this name that exist, within the origin
and request scope asked for.