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)
committerVincent Bernat <bernat@debian.org>
Sun, 15 Aug 2021 20:42:57 +0000 (21:42 +0100)
commitc79ced57cf5919664f46f38715879ab4a4f18f41
tree71518af0acc0f86d72371b8abdaf2e1702941b11
parent3dfff31ed087b28f7060f84d7d006d78d2c9e557
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