REORG: http: move has_forbidden_char() from h2.c to http.h
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Aug 2023 15:00:50 +0000 (17:00 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Sat, 16 Dec 2023 16:41:30 +0000 (17:41 +0100)
commit7483776e5f464e5dfaebf99e8c40b79a5f09057d
treecfce0e28e30b3d5b70a32c94e6af7bcca181879b
parenta2fae024e9ea181102184a4af931fe4cf0cebca6
REORG: http: move has_forbidden_char() from h2.c to http.h

Origin: https://git.haproxy.org/?p=haproxy-2.6.git;a=commit;h=4a776fd01560a8dfa7a57b30b4d5249c8da7b12c

This function is not H2 specific but rather generic to HTTP. We'll
need it in H3 soon, so let's move it to HTTP and rename it to
http_header_has_forbidden_char().

(cherry picked from commit d4069f3cee0f6e94afaec518b6373dd368073f52)
 [ad: backported for next patch BUG/MAJOR: h3: reject header values
 containing invalid chars]
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit 21c4ffd025115058994a3e2765c17fc3cee52f90)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit 9c0bc4f201cf58c10706416cb4807c0f4794f8ac)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
Gbp-Pq: Name REORG-http-move-has_forbidden_char-from-h2.c-to-http.patch
include/haproxy/http.h
src/h2.c