Christopher Faulet
910b7577bc
BUG/MEDIUM: compression: handle rewrite errors when updating response headers
When an HTTP response is compressed by HAProxy, the headers are updated. However it is possible to encounter a rewrite error because the buffer is full. In this case, the compression is aborted. Thus, we must be sure to leave the response in a valid state. For now, it is an issue because the "Content-Encoding" header is added before all other headers manipulations. So if the compression is aborted on error, the "Content-Encoding" header may remain while the payload is not compressed. So now, we take care to leave with a valid response on error by reordering the headers manipulations. It is too painful to really rollback all changes, especially for an edge case. This patch should be backported as far as 2.0. Note that on the 2.0, the legacy HTTP part is also concerned.
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)
Description
Languages
Shell
100%