]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-h1: Simplify the connection mode management by sanitizing headers
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 28 Mar 2019 14:42:24 +0000 (15:42 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Apr 2019 20:06:53 +0000 (22:06 +0200)
commitb992af00b6b1e2b2e634447e3c4a08d978c1fc36
treead5069d1cd0faeec86e528c0c02c0b3b15a76781
parenta51ebb7f56b162d995154146fb1d0be369d95f8b
MEDIUM: mux-h1: Simplify the connection mode management by sanitizing headers

Connection headers are now sanitized during the parsing and the formatting. This
means "close" and "keep-alive" values are always removed but right flags are
set. This way, client side and server side are independent of each other. On the
input side, after the parsing, neither "close" nor "keep-alive" values
remain. So on the output side, if we found one of these values in a connection
headers, it means it was explicitly added by HAProxy. So it overwrites the other
rules, if applicable. Always sanitizing the output is also a way to simplifiy
conditions to update the connection header. Concretly, only additions of "close"
or "keep-alive" values remain, depending the case.

No need to backport this patch.
src/mux_h1.c