]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
document a small trunk-only mod_rewrite indulgence
authorEric Covener <covener@apache.org>
Thu, 2 Feb 2012 19:31:01 +0000 (19:31 +0000)
committerEric Covener <covener@apache.org>
Thu, 2 Feb 2012 19:31:01 +0000 (19:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1239778 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.xml
docs/manual/rewrite/rewritemap.xml

index 50f84ca1ac8422e8e80129e33284fb6d089f41a9..4448290dae334d1b0cd7b91b8fbd737a3e0d6890 100644 (file)
@@ -264,9 +264,9 @@ Apache HTTP Server 2.0.41 and later</compatibility>
         utility.  (<a href="../rewrite/rewritemap.html#dbm">Details ...</a>)</dd>
 
     <dt>int</dt>
-        <dd>One of the four available internal functions provided by
-        <code>RewriteMap</code>: toupper, tolower, escape or
-        unescape. (<a href="../rewrite/rewritemap.html#int">Details ...</a>)</dd>
+        <dd>One of the five available internal functions provided by
+        <code>RewriteMap</code>: toupper, tolower, escape, unescape, or sleep. 
+        (<a href="../rewrite/rewritemap.html#int">Details ...</a>)</dd>
 
     <dt>prg</dt>
         <dd>Calls an external program or script to process the
@@ -1041,7 +1041,9 @@ cannot use <code>$N</code> in the substitution string!
         <dd>A dash indicates that no substitution should be performed
         (the existing path is passed through untouched). This is used
         when a flag (see below) needs to be applied without changing
-        the path.</dd>
+        the path.  In Apache HTTP Server 2.5.0 and later, a substitution
+        that ultimately expands to this single character is also treated as
+        "no substitution".</dd>
 
       </dl>
 
index aa6386e2576d0bc84b894f8c8b227b361f18d54b..147d3b9b0e1b9f5319098f3969ccc5e26941cf0b 100644 (file)
@@ -315,6 +315,11 @@ by many requests.
       <li><strong>unescape</strong>:<br/>
              Translates hex-encodings in the key back to
             special characters.</li>
+      <li><strong>sleep</strong>:<br/>
+             Causes the request to sleep for the amount of time specified in
+            the key, in milliseconds.  Keys are accepted in the form of 
+            "2000", "2000ms", or "2s".  This map always returns an empty value.
+            <p> Available since Apache HTTP Server 2.5.0</p> </li>
     </ul>
 
     <p>
@@ -326,6 +331,12 @@ by many requests.
     RewriteMap lc int:tolower<br />
     RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]
     </example>
+    
+    <example><title>Delay a request by one half of a second</title>
+    RewriteMap sleep int:sleep<br />
+    RewriteRule ^/foo/bar.html -${sleep:"500ms"} 
+    </example>
+
 
     <note>
     <p>Please note that the example offered here is for