Christopher,
again: Thank you for the very helpful review. In this series you can find v2 of
my URI normalization patches. I hope I did not forget to incorporate any of
your feedback.
Some general notes:
- I completely cleaned up the commit history to group similar patches (e.g. the
two patches for dotdot) and to avoid later commits completely refactoring
earlier commits (e.g. the error handling).
- As suggested I am now returning the error code and taking a `struct ist *dst`.
- The values of `enum uri_normalizer_err` are cleaned up.
- I cleaned up the error handling in `http_action_normalize_uri`.
- I am now using `istdiff()`.
- Dynamic allocation is no more.
- I fixed some parts of the code style (`struct ist* foo` -> `struct ist *foo`).
- I const'ified as much as possible.
Tim Düsterhus (8):
MINOR: uri_normalizer: Add uri_normalizer module
MINOR: uri_normalizer: Add `enum uri_normalizer_err`
MINOR: uri_normalizer: Add `http-request normalize-uri`
MINOR: uri_normalizer: Add a `merge-slashes` normalizer to
http-request normalize-uri
MINOR: uri_normalizer: Add a `dotdot` normalizer to http-request
normalize-uri
MINOR: uri_normalizer: Add support for supressing leading `../` for
dotdot normalizer
MINOR: uri_normalizer: Add a `sort-query` normalizer
MINOR: uri_normalizer: Add a `percent-upper` normalizer
Makefile | 2 +-
doc/configuration.txt | 58 +++++
include/haproxy/action-t.h | 9 +
include/haproxy/uri_normalizer-t.h | 31 +++
include/haproxy/uri_normalizer.h | 33 +++
reg-tests/http-rules/normalize_uri.vtc | 314 +++++++++++++++++++++++++
src/http_act.c | 201 ++++++++++++++++
src/uri_normalizer.c | 296 +++++++++++++++++++++++
8 files changed, 943 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