haproxy public development tree
Go to file
Willy Tarreau 88d138ef6d BUG/MEDIUM: mux-h2: decode trailers in HEADERS frames
This is not exactly a bug but a long-time design limitation. We used not
to decode trailers in H2, resulting in broken connections each time a
trailer was sent, since it was impossible to keep the HPACK decompressor
synchronized. Now that the sequencing of operations permits it, we must
make sure to at least properly decode them.

What we try to do is to identify if a HEADERS frame was already seen and
use this indication to know if it's a headers or a trailers. For this,
h2c_decode_headers() checks if the stream indicates that a HEADERS frame
was already received. If so, it decodes it and emits the trailing
0 CRLF CRLF in case of H1, or the HTX_EOD + HTX_EOM blocks in case of HTX,
to terminate the data stream.

The trailers contents are still deleted for now but the request works, and
the connection remains synchronized and usable for subsequent streams.

The correctness may be tested using a simple config and h2spec :

    h2spec -o 1000 -v -t -S -k -h 127.0.0.1 -p 4443 generic/4/4

This should definitely be backported to 1.9 given the low impact for the
benefit. However it cannot be backported to 1.8 since the operations cannot
be resumed. The following patches are also needed with this one :

   MINOR: mux-h2: make h2c_decode_headers() return a status, not a count
   MINOR: mux-h2: add a new dummy stream : h2_error_stream
   MEDIUM: mux-h2: make h2c_decode_headers() support recoverable errors
   BUG/MINOR: mux-h2: detect when the HTX EOM block cannot be added after headers
   MINOR: mux-h2: check for too many streams only for idle streams
   MINOR: mux-h2: set H2_SF_HEADERS_RCVD when a HEADERS frame was decoded
2019-01-03 18:45:38 +01:00
contrib CONTRIB: debug: report stream-int's flag SI_FL_CLEAN_ABRT 2018-12-18 11:03:11 +01:00
doc MINOR: lb: allow redispatch when using consistent hash 2019-01-02 20:22:17 +01:00
ebtree CLEANUP: fix typos in comments in ebtree 2018-11-18 22:23:15 +01:00
examples [RELEASE] Released version 2.0-dev0 2018-12-22 11:20:35 +01:00
include MINOR: lb: allow redispatch when using consistent hash 2019-01-02 20:22:17 +01:00
reg-tests REGTESTS: remove the expected window updates from H2 handshakes 2018-12-23 09:58:41 +01:00
scripts REGTEST: script: Add support of alternatives in requited options list 2018-12-21 15:33:26 +01:00
src BUG/MEDIUM: mux-h2: decode trailers in HEADERS frames 2019-01-03 18:45:38 +01:00
tests CLEANUP: fix a misspell in tests/filltab25.c 2018-11-18 22:23:15 +01:00
.gitignore DOC: split the README into README + INSTALL 2018-12-16 22:30:57 +01:00
CHANGELOG [RELEASE] Released version 2.0-dev0 2018-12-22 11:20:35 +01:00
CONTRIBUTING DOC: Fix typos in README and CONTRIBUTING 2018-11-12 08:54:12 +01:00
INSTALL [RELEASE] Released version 2.0-dev0 2018-12-22 11:20:35 +01:00
LICENSE LICENSE: add licence exception for OpenSSL 2012-09-07 13:52:26 +02:00
MAINTAINERS DOC: fix reference to map files in MAINTAINERS 2018-10-17 04:21:04 +02:00
Makefile REGTEST: Make reg-tests target support argument. 2018-12-20 10:37:32 +01:00
README DOC: split the README into README + INSTALL 2018-12-16 22:30:57 +01:00
ROADMAP DOC: update the roadmap about priority queues 2018-08-10 17:12:04 +02:00
SUBVERS BUILD: use format tags in VERDATE and SUBVERS files 2013-12-10 11:22:49 +01:00
VERDATE [RELEASE] Released version 2.0-dev0 2018-12-22 11:20:35 +01:00
VERSION [RELEASE] Released version 2.0-dev0 2018-12-22 11:20:35 +01:00

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)