mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-27 00:31:22 +02:00
When chunked-encoding is used in HTX mode, a trailers HTX block is always made due to the way trailers are currently implemented (verbatim copy of the H1 representation). Because of this it's not possible to know when processing data that we've reached the end of the stream, and it's up to the function encoding the trailers (h2s_htx_make_trailers) to put the end of stream. But when there are no trailers and only an empty HTX block, this one cannot produce a HEADERS frame, thus it cannot send the END_STREAM flag either, leaving the other end with an incomplete message, waiting for either more data or some trailers. This is particularly visible with POST requests where the server continues to wait. What this patch does is transform the HEADERS frame into an empty DATA frame when meeting an empty trailers block. It is possible to do this because we've not sent any trailers so the other end is still waiting for DATA frames. The check is made after attempting to encode the list of headers, so as to minimize the specific code paths. Thanks to Dragan Dosen for reporting the issue with a reproducer. This fix must be backported to 1.9.
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)
Description
Languages
C
98.1%
Shell
0.8%
Makefile
0.5%
Lua
0.2%
Python
0.2%