MINOR: h2: pass accept-invalid-http-request down the request parser
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Aug 2023 13:38:28 +0000 (15:38 +0200)
committerAdrian Bunk <bunk@debian.org>
Wed, 23 Apr 2025 17:55:00 +0000 (20:55 +0300)
commit6db5d49235b5025185ee429183f3bd10d58fd998
tree0894f8c072005dc30f05d5261b89280c0b0b0dd4
parent6c3a80c833d21f4df0943675021160ff05c34962
MINOR: h2: pass accept-invalid-http-request down the request parser

Origin: https://git.haproxy.org/?p=haproxy-2.2.git;a=commit;h=d87aeb80c45cc504274188f0e5048148f3c4f2ff

We're adding a new argument "relaxed" to h2_make_htx_request() so that
we can control its level of acceptance of certain invalid requests at
the proxy level with "option accept-invalid-http-request". The goal
will be to add deactivable checks that are still desirable to have by
default. For now no test is subject to it.

(cherry picked from commit d93a00861d714313faa0395ff9e2acb14b0a2fca)
 [ad: backported for following fix : BUG/MINOR: h2: reject more chars
  from the :path pseudo header]
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit b6be1a4f858eb6602490c192235114c1a163fef9)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit 26fa3a285df0748fc79e73e552161268b66fb527)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit 014945a1508f43e88ac4e89950fa9037e4fb0679)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit f86e994f5fb5851cd6e4f7f6b366e37765014b9f)
[wt: adjusted ctx in h2.h]
Signed-off-by: Willy Tarreau <w@1wt.eu>
Gbp-Pq: Name MINOR-h2-pass-accept-invalid-http-request-down-the-r.patch
include/haproxy/h2.h
src/h2.c
src/mux_h2.c