]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: config: better detect the presence of the h2 pattern in npn/alpn
authorWilly Tarreau <w@1wt.eu>
Sun, 11 Nov 2018 09:36:25 +0000 (10:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Nov 2018 09:42:37 +0000 (10:42 +0100)
commit4db49c0704898e51892a176505299de3e022c5ea
tree4790a22beca48691a43e641faa13a196c7bf8f79
parent4eb7d745e26434b08eaf91e6448bec64788f04e2
BUG/MINOR: config: better detect the presence of the h2 pattern in npn/alpn

In 1.8, commit 45a66cc ("MEDIUM: config: ensure that tune.bufsize is at
least 16384 when using HTTP/2") tried to avoid an annoying issue making
H2 fail when haproxy is built with default buffer sizes smaller than 16kB,
which used to be the case for a very long time. Sadly, the test only sees
when NPN/ALPN exactly match "h2" and not when it's combined like
"h2,http/1.1" nor "http/1.1,h2". We can safely use strstr() there because
the string is prefixed by the token's length (0x02) which is unambiguous
as it cannot be part of any other token.

This fix should be backported to 1.8 as a safety guard against bad
configurations.
src/cfgparse.c