MINOR: uri_normalizer: Add `fragment-strip` normalizer
This normalizer strips the URI's fragment component which should never be sent
to the server.
See GitHub Issue #714.
diff --git a/doc/configuration.txt b/doc/configuration.txt
index a716c34..7ab7baa 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -6172,6 +6172,7 @@
See RFC 8297 for more information.
http-request normalize-uri <normalizer> [ { if | unless } <condition> ]
+http-request normalize-uri fragment-strip [ { if | unless } <condition> ]
http-request normalize-uri path-merge-slashes [ { if | unless } <condition> ]
http-request normalize-uri path-strip-dot [ { if | unless } <condition> ]
http-request normalize-uri path-strip-dotdot [ full ] [ { if | unless } <condition> ]
@@ -6209,6 +6210,17 @@
The following normalizers are available:
+ - fragment-strip: Removes the URI's "fragment" component.
+
+ According to RFC 3986#3.5 the "fragment" component of an URI should not
+ be sent, but handled by the User Agent after retrieving a resource.
+
+ This normalizer should be applied first to ensure that the fragment is
+ not interpreted as part of the request's path component.
+
+ Example:
+ - /#foo -> /
+
- path-strip-dot: Removes "/./" segments within the "path" component
(RFC 3986#6.2.2.3).