Willy,
Christopher,
Not sure who of you is better suited to review this series, so I'm adding both
of you :-)
I'm tagging this as RFC, because it's large and quite a bit outside of my
comfort zone. However the patches are as clean as possible. They include full
documentation and each normalizer comes with a bunch of reg-tests ensuring they
behave like I expect them to behave. So if you have nothing to complain, then
this series is in a mergeable state. I plan to add a few more normalizers after
this passes an initial review.
I'll add additional remarks to each patch, explaining my decisions in more
detail.
Best regards
Tim Düsterhus (8):
MINOR: uri_normalizer: Add uri_normalizer module
MINOR: uri_normalizer: Add `http-request normalize-uri`
MINOR: uri_normalizer: Add a `dotdot` normalizer to http-request
normalize-uri
MINOR: uri_normalizer: Add a `sort-query` normalizer
OPTIMIZE: uri_normalizer: Optimize allocations in
uri_normalizer_query_sort
MINOR: uri_normalizer: Add support for supressing leading `../` for
dotdot normalizer
MINOR: uri_normalizer: Support returning detailed errors from uri
normalization
MINOR: uri_normalizer: Add a `percent-upper` normalizer
Makefile | 3 +-
doc/configuration.txt | 58 +++++
include/haproxy/action-t.h | 9 +
include/haproxy/uri_normalizer-t.h | 32 +++
include/haproxy/uri_normalizer.h | 33 +++
reg-tests/http-rules/normalize_uri.vtc | 314 +++++++++++++++++++++++++
src/http_act.c | 213 +++++++++++++++++
src/uri_normalizer.c | 298 +++++++++++++++++++++++
8 files changed, 959 insertions(+), 1 deletion(-)
create mode 100644 include/haproxy/uri_normalizer-t.h
create mode 100644 include/haproxy/uri_normalizer.h
create mode 100644 reg-tests/http-rules/normalize_uri.vtc
create mode 100644 src/uri_normalizer.c
--
2.31.1