haproxy public development tree
Go to file
Willy Tarreau 6195237040 BUG/MEDIUM: mux-h1: don't enforce chunked encoding on requests
Recent commit 4710d20 ("BUG/MEDIUM: mux-h1: make HTX chunking
consistent with H2") tried to address chunking inconsistencies between
H1/HTX/H2 and has enforced it on every outgoing message carrying
H1_MF_XFER_LEN without H1_MF_CLEN nor H1_MF_CHNK. But it also does it
on requests, which is not appropriate since a request by default
doesn't have a message body unless explicitly mentioned. Also make
sure we only do this on HTTP/1.1 messages.

The problem is to guarantee the highest level of compatibility between
H1/H1, H1/H2, H2/H1 in each direction regarding the lack of content-
length. We have this truth table (a star '*' indicates which one can
pass trailers) :

  H1 client -> H1 server :
     request:
        CL=0 TE=0 XL=1 -> CL=0 TE=0
        CL=0 TE=1 XL=1 -> CL=0 TE=1 *
        CL=1 TE=0 XL=1 -> CL=1 TE=0
        CL=1 TE=1 XL=1 -> CL=1 TE=1 *

     response:
        CL=0 TE=0 XL=0 -> CL=0 TE=0
        CL=0 TE=1 XL=1 -> CL=0 TE=1 *
        CL=1 TE=0 XL=1 -> CL=1 TE=0
        CL=1 TE=1 XL=1 -> CL=1 TE=1 *

  H2 client -> H1 server : (H2 messages always carry XFER_LEN)
     request:
        CL=0 XL=1 -> CL=0 TE=0
        CL=1 XL=1 -> CL=1 TE=0

     response:
        CL=0 TE=0 XL=0 -> CL=0
        CL=0 TE=1 XL=1 -> CL=0 *
        CL=1 TE=0 XL=1 -> CL=1
        CL=1 TE=1 XL=1 -> CL=1 *

  H1 client -> H2 server : (H2 messages always carry XFER_LEN)
     request:
        CL=0 TE=0 XL=1 -> CL=0
        CL=0 TE=1 XL=1 -> CL=0 *
        CL=1 TE=0 XL=1 -> CL=1
        CL=1 TE=1 XL=1 -> CL=1 *

     response:
        CL=0 XL=1 -> CL=0 TE=1 *
        CL=1 XL=1 -> CL=1 TE=0

For H1 client to H2 server, it will be possible to rely on the presence
of "TE: trailers"  in the H1 request to automatically switch to chunks
in the response, and be able to pass trailers at the end. For now this
check is not implemented so an H2 response missing a content-length to
an H1 request will always have a transfer-encoding header added and
trailers will be forwarded if any.

This patch depends on previous commit "MINOR: mux-h1: parse the
content-length header on output and set H1_MF_CLEN" to work properly.

Since the aforementioned commit is scheduled for backport to 1.9 this
commit must also be backported to 1.9.
2019-01-03 22:27:45 +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: h2: add h2_make_htx_trailers to turn H2 headers to HTX trailers 2019-01-03 18:45:38 +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-h1: don't enforce chunked encoding on requests 2019-01-03 22:27:45 +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
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
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)