MINOR: http: add a new function http_validate_scheme() to validate a scheme
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Aug 2021 13:35:36 +0000 (15:35 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Sat, 23 Dec 2023 10:02:19 +0000 (11:02 +0100)
commitec3edf5312df4434b4fe305088c4608a6a068f21
tree438b2e639011c604b1d5b7de462e129f6ad9997e
parentd5a641f9a9327be8176be874bdce65fd8b7e2d18
MINOR: http: add a new function http_validate_scheme() to validate a scheme

While http_parse_scheme() extracts a scheme from a URI by extracting
exactly the valid characters and stopping on delimiters, this new
function performs the same on a fixed-size string.

(cherry picked from commit adfc08e717db600c3ac44ca8f3178d861699b67c)
[wt: context adj]
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 073e9c9c10897a05117f29cb9d3ebdbc13ff03b5)
[wt: context adj]
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 0fb53c3c025fb158c51c515532f3f52bb2abcdea)
Signed-off-by: Willy Tarreau <w@1wt.eu>
Gbp-Pq: Name 2.2-0001-MINOR-http-add-a-new-function-http_validate_scheme-t.patch
include/haproxy/http.h
src/http.c