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 //.

For example, //foo/bar//baz is compacted to /foo/bar/baz.

  • Constructor Details

    • CompactPathRule

      public CompactPathRule()
  • Method Details

    • matchAndApply

      public Rule.Handler matchAndApply(Rule.Handler input) throws IOException
      Description copied from class: Rule

      Tests whether the given Request should apply, and if so the rule logic is triggered.

      Specified by:
      matchAndApply in class Rule
      Parameters:
      input - the input Request and Handler
      Returns:
      the possibly wrapped Request and Handler, or null if the rule did not match
      Throws:
      IOException - if applying the rule failed