MINOR: config: warn on presence of "\n" in header values/replacements
Yves Lafon reported an interesting case where an old rsprep rule used
to conditionally append a header field by inserting a \n in the exising
value was breaking H2 in HTX mode, with the browser rightfully reporting
a PROTOCOL_ERROR when facing the \n. In legacy mode, since the response
is first parsed again as an HTTP/1 message before being converted to H2
the issue does not happen. We should definitely discourage from using
this old trick nowadays, http-request and http-response rules were made
exactly to end this. Let's detect this and emit a warning when present.
In 2.0 there is already a warning recalling that these rules are
deprecated and which explains what to do instead, so the user now gets
all the relevant information to convert them.
There is no upstream commit ID for this patch because these rules were
indeed removed from 2.1. This patch could be backported to 1.9 as it
can also trigger the problem when HTX is enabled.
1 file changed