Class CompactPathRule

java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.CompactPathRule

public class CompactPathRule extends Rule

Rewrites the URI by compacting to remove occurrences of // and /../.

Optionally decode the path before compacting.

Optionally canonicalize path before compacting.

Examples
isDecoding isCanonicalizing Input Path Resulting Path
false (default) false (default) //foo/bar//baz /foo/bar/baz
false (default) false (default) //foo/../bar//baz /bar/baz
true true //foo/../bar//baz /bar/baz
See Also:
  • URIUtil.decodePath(String)
  • URIUtil.canonicalPath(String)
  • URIUtil.compactPath(String)