mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-16 10:36:55 +00:00
haproxy public development tree
It is only a problem on the response path because the request payload length it always known. But when a filter is registered to analyze the response payload, the filtering may hang if the server closes just after the headers. The root cause of the bug comes from an attempt to allow the filters to not immediately forward the headers if necessary. A filter may choose to hold the headers by not forwarding any bytes of the payload. For a message with no payload but a known payload length, there is always a EOM block to forward. Thus holding the EOM block for bodyless messages is a good way to also hold the headers. However, messages with an unknown payload length, there is no EOM block finishing the message, but only a SHUTR flag on the channel to mark the end of the stream. If there is no payload when it happens, there is no payload at all to forward. In the filters API, it is wrongly detected as a condition to not forward the headers. Because it is not the most used feature and not the obvious one, this patch introduces another way to hold the message headers at the begining of the forwarding. A filter flag is added to explicitly says the headers should be hold. A filter may choose to set the STRM_FLT_FL_HOLD_HTTP_HDRS flag and not forwad anything to hold the headers. This flag is removed at each call, thus it must always be explicitly set by filters. This flag is only evaluated if no byte has ever been forwarded because the headers are forwarded with the first byte of the payload. reg-tests/filters/random-forwarding.vtc reg-test is updated to also test responses with unknown payload length (with and without payload). This patch must be backported as far as 2.0. |
||
---|---|---|
.github | ||
contrib | ||
doc | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
BRANCHES | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
ROADMAP | ||
SUBVERS | ||
VERDATE | ||
VERSION |
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 - BRANCHES to understand the project's life cycle and what version to use - 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)