]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: h1: ensure the chunk size parser can deal with full buffers
authorWilly Tarreau <w@1wt.eu>
Fri, 10 Nov 2017 10:17:08 +0000 (11:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Nov 2017 10:17:08 +0000 (11:17 +0100)
commitb15e3fefc96b772e5da54631a83a11c32b7e0111
tree3e1de4f12919cfffc3505d4442d41371c4658671
parent8c0ea7d21a2b197b2b9a101cb7e747a7cd788ae7
BUG/MEDIUM: h1: ensure the chunk size parser can deal with full buffers

The HTTP/1 code always has the reserve left available so the buffer is
never full there. But with HTTP/2 we have to deal with full buffers,
and it happens that the chunk size parser cannot tell the difference
between a full buffer and an empty one since it compares the start and
the stop pointer.

Let's change this to instead deal with the number of bytes left to process.

As a side effect, this code ends up being about 10% faster than the previous
one, even on HTTP/1.
include/proto/h1.h