patplex: Added URL unquoting functionality.
[ashd.git] / doc / patplex.doc
index be3da48..86d6ace 100644 (file)
@@ -67,14 +67,15 @@ rules are recognized:
        matched case-independently. If the *match* stanza as a whole
        matches and contains no *restpat* line (as described below),
        the rest string of the request is replaced by the remainder of
-       the rest string after the portion that was matched by 'REGEX'.
+       the rest string after the portion that was matched by
+       'REGEX'. See also URL UNQUOTING, below.
 
 *url* 'REGEX' 'FLAGS'::
 
        'REGEX' must be an extended regular expression. The rule is
        considered to match if 'REGEX' matches the raw URL of the
        request. If 'FLAGS' contain the character `i`, 'REGEX' is
-       matched case-independently.
+       matched case-independently. See also URL UNQUOTING, below.
 
 *method* 'REGEX' 'FLAGS'::
 
@@ -155,6 +156,20 @@ optional lines:
 If no *match* stanza matches, a 404 response is returned to the
 client.
 
+URL UNQUOTING
+-------------
+
+If the 'FLAGS' of a *point* or *url* rule contain the character `q`,
+then the rule's pattern will be matched against a copy of the input
+string where URL percent-escapes have been decoded so that, for
+example, the regular expression `^~` will match an input string that
+begins with either `~`, `%7E` or `%7e`.
+
+Even if such percent-escapes were decoded, however, the original
+version of the string will be used for any *restpat* expansion,
+regardlessly of whether the escapes were unquoted inside or outside
+the matched part of the string.
+
 SIGNALS
 -------