MEDIUM: mux-h2: do not map Host to :authority on output
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Oct 2019 16:16:18 +0000 (18:16 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 9 Oct 2019 09:10:19 +0000 (11:10 +0200)
commitb8ce8905cf63ecd06b36af39c05103fadf3cc347
tree7eb4c5127f9a119b98b54d76d21accde94625a43
parent1440fe8b4beadde545dd0272095c96d2b3a50dbe
MEDIUM: mux-h2: do not map Host to :authority on output

Instead of mapping the Host header field to :authority, we now act
differently if the request is in origin form or in absolute form.
If it's absolute, we extract the scheme and the authority from the
request, fix the path if it's empty, and drop the Host header.
Otherwise we take the scheme from the http/https flags in the HTX
layer, make the URI be the path only, and emit the Host header,
as indicated in RFC7540#8.1.2.3. This allows to distinguish between
absolute and origin requests for H1 to H2 conversions.
src/mux_h2.c