]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-h2: only update rxbuf's length for H1 headers
authorWilly Tarreau <w@1wt.eu>
Thu, 3 Jan 2019 09:26:23 +0000 (10:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Jan 2019 09:30:10 +0000 (10:30 +0100)
commit831959300578212721f573fb3656768806675422
tree6ed5dae1cf2bc10caeff7a4f70d6880884a925c2
parent45ffc0ca347c523671a16698a147b819291dae01
BUG/MINOR: mux-h2: only update rxbuf's length for H1 headers

In h2c_decode_headers() we update the buffer's length according to the
amount of data produced (outlen). But in case of HTX this outlen value
is not a quantity, just an indicator of success, resulting in the buffer
being added one extra byte and temporarily showing .data > .size, which
is wrong. Fortunately this is overridden when leaving the function by
htx_to_buf() so the impact only exists in step-by-step debugging, but
it definitely needs to be fixed.

This must be backported to 1.9.
src/mux_h2.c