MINOR: uri_normalizer: Add a `sort-query` normalizer
This normalizer sorts the `&` delimited query parameters by parameter name.
See GitHub Issue #714.
diff --git a/doc/configuration.txt b/doc/configuration.txt
index 585c675..547ed13 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -6014,6 +6014,7 @@
http-request normalize-uri <normalizer> [ { if | unless } <condition> ]
http-request normalize-uri dotdot [ full ] [ { if | unless } <condition> ]
http-request normalize-uri merge-slashes [ { if | unless } <condition> ]
+http-request normalize-uri sort-query [ { if | unless } <condition> ]
Performs normalization of the request's URI. The following normalizers are
available:
@@ -6045,6 +6046,15 @@
- // -> /
- /foo//bar -> /foo/bar
+ - sort-query: Sorts the query string parameters by parameter name.
+ Parameters are assumed to be delimited by '&'. Shorter names sort before
+ longer names and identical parameter names maintain their relative order.
+
+ Example:
+ - /?c=3&a=1&b=2 -> /?a=1&b=2&c=3
+ - /?aaa=3&a=1&aa=2 -> /?a=1&aa=2&aaa=3
+ - /?a=3&b=4&a=1&b=5&a=2 -> /?a=3&a=1&a=2&b=4&b=5
+
http-request redirect <rule> [ { if | unless } <condition> ]
This performs an HTTP redirection based on a redirect rule. This is exactly