BUG/MEDIUM: mux-h1: Always adjust case for all outgoing headers as expected
In HTX, all header names are converted to lowercase. However, some legacy H1 applications are still sensitive to the header names case. For this purpose, it is possible to provide a map to automatically adjust the case of header names. While it is performed for most responses, it is not true for the low-level errors triggered during requests parsing. It the same ways, the case of "Sec-Websocket-Key" a "Sec-Websocket-Accept" headers were adjusted as expected. To fix this issue the h1-htx API was slightly changed. Now the map used to adjust the case of header names, if any, is passed to the function responsible to format the headers. In the H1 multiplexer, the map is first retrieved then passed as argument to h1_format_htx_hdr() and h1_format_htx_msg() functions. A NULL pointer is passed if no rewrite must be performed. In the H1 multiplexer, h1_adjust_case_outgoing_hdr() was replaced by h1_get_hdrs_map(). All other calls to h1_format_htx_hdr() were adapted to use a NULL pointer (httpclient, http-fetch). This patch relies on "REORG: h1-htx: Move h1 headers map in h1-htx". Both commits should be backported to all supported versions. This should fix the issue #3448.
C
Christopher Faulet committed
f66cb3e5bff9518319bfd99faf78ad44f4308b7b
Parent: 73ee6a5