From: Daniel Gruno Date: Tue, 1 May 2012 09:21:13 +0000 (+0000) Subject: Fix whitespace issues and anchor patterns when needed in flags.xml X-Git-Tag: 2.5.0-alpha~6931 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4084b7d841567d4d0f8b47d43707297738a9911c;p=thirdparty%2Fapache%2Fhttpd.git Fix whitespace issues and anchor patterns when needed in flags.xml Fix double-escaped characters in advanced.xml git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1332585 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/advanced.html.en b/docs/manual/rewrite/advanced.html.en index b723e23de0d..22fdd7f239c 100644 --- a/docs/manual/rewrite/advanced.html.en +++ b/docs/manual/rewrite/advanced.html.en @@ -269,13 +269,13 @@ $QS_n = 3600 if ($QS_n eq ''); if ($QS_f eq '') { print "HTTP/1.0 200 OK\n"; print "Content-type: text/html\n\n"; -print "&lt;b&gt;ERROR&lt;/b&gt;: No file given\n"; +print "<b>ERROR</b>: No file given\n"; exit(0); } if (! -f $QS_f) { print "HTTP/1.0 200 OK\n"; print "Content-type: text/html\n\n"; -print "&lt;b&gt;ERROR&lt;/b&gt;: File $QS_f not found\n"; +print "<b>ERROR</b>: File $QS_f not found\n"; exit(0); } @@ -307,7 +307,7 @@ local($file) = @_; local(*FP, $size, $buffer, $bytes); ($x, $x, $x, $x, $x, $x, $x, $size) = stat($file); $size = sprintf("%d", $size); -open(FP, "&lt;$file"); +open(FP, "<$file"); $bytes = sysread(FP, $buffer, $size); close(FP); return $buffer; diff --git a/docs/manual/rewrite/advanced.xml b/docs/manual/rewrite/advanced.xml index deab5ee9826..54647273617 100644 --- a/docs/manual/rewrite/advanced.xml +++ b/docs/manual/rewrite/advanced.xml @@ -272,13 +272,13 @@ $QS_n = 3600 if ($QS_n eq ''); if ($QS_f eq '') { print "HTTP/1.0 200 OK\n"; print "Content-type: text/html\n\n"; -print "&lt;b&gt;ERROR&lt;/b&gt;: No file given\n"; +print "<b>ERROR</b>: No file given\n"; exit(0); } if (! -f $QS_f) { print "HTTP/1.0 200 OK\n"; print "Content-type: text/html\n\n"; -print "&lt;b&gt;ERROR&lt;/b&gt;: File $QS_f not found\n"; +print "<b>ERROR</b>: File $QS_f not found\n"; exit(0); } @@ -310,7 +310,7 @@ local($file) = @_; local(*FP, $size, $buffer, $bytes); ($x, $x, $x, $x, $x, $x, $x, $size) = stat($file); $size = sprintf("%d", $size); -open(FP, "&lt;$file"); +open(FP, "<$file"); $bytes = sysread(FP, $buffer, $size); close(FP); return $buffer; diff --git a/docs/manual/rewrite/flags.html.en b/docs/manual/rewrite/flags.html.en index 492d54468ca..2ab31c2a9ef 100644 --- a/docs/manual/rewrite/flags.html.en +++ b/docs/manual/rewrite/flags.html.en @@ -265,7 +265,7 @@ environment variable is used to exclude those requests from the access log.

-RewriteRule \.(png|gif|jpg) - [E=image:1]
+RewriteRule \.(png|gif|jpg)$ - [E=image:1]
 CustomLog logs/access_log combined env=!image
 
@@ -481,7 +481,7 @@ requests. example, if you wanted all image requests to be handled by a back-end image server, you might do something like the following:

-
RewriteRule /(.*)\.(jpg|gif|png) http://images.example.com/$1.$2 [P]
+
RewriteRule /(.*)\.(jpg|gif|png)$ http://images.example.com/$1.$2 [P]

Use of the [P] flag implies [L] - that is, the request is immediately @@ -531,7 +531,7 @@ use the [PT] flag to ensure that the

 Alias /icons /usr/local/apache/icons
-RewriteRule /pics/(.+)\.jpg /icons/$1.gif [PT]
+RewriteRule /pics/(.+)\.jpg$ /icons/$1.gif [PT]
 
@@ -666,12 +666,12 @@ RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .? - [S=3] # IF the file exists, then: - RewriteRule (.*\.gif) images.php?$1 - RewriteRule (.*\.html) docs.php?$1 - # Skip past the "else" stanza. - RewriteRule .? - [S=1] + RewriteRule (.*\.gif) images.php?$1 + RewriteRule (.*\.html) docs.php?$1 + # Skip past the "else" stanza. + RewriteRule .? - [S=1] # ELSE... - RewriteRule (.*) 404.php?file=$1 + RewriteRule (.*) 404.php?file=$1 # END diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index ae538c44b19..64b78d423aa 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -252,7 +252,7 @@ environment variable is used to exclude those requests from the access log.

-RewriteRule \.(png|gif|jpg) - [E=image:1] +RewriteRule \.(png|gif|jpg)$ - [E=image:1] CustomLog logs/access_log combined env=!image @@ -465,7 +465,7 @@ requests. example, if you wanted all image requests to be handled by a back-end image server, you might do something like the following:

-RewriteRule /(.*)\.(jpg|gif|png) http://images.example.com/$1.$2 [P] +RewriteRule /(.*)\.(jpg|gif|png)$ http://images.example.com/$1.$2 [P]

Use of the [P] flag implies [L] - that is, the request is immediately pushed through the proxy, and any following rules will not be @@ -520,7 +520,7 @@ use the [PT] flag to ensure that the Alias /icons /usr/local/apache/icons -RewriteRule /pics/(.+)\.jpg /icons/$1.gif [PT] +RewriteRule /pics/(.+)\.jpg$ /icons/$1.gif [PT]

@@ -654,12 +654,12 @@ RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .? - [S=3] # IF the file exists, then: - RewriteRule (.*\.gif) images.php?$1 - RewriteRule (.*\.html) docs.php?$1 - # Skip past the "else" stanza. - RewriteRule .? - [S=1] + RewriteRule (.*\.gif) images.php?$1 + RewriteRule (.*\.html) docs.php?$1 + # Skip past the "else" stanza. + RewriteRule .? - [S=1] # ELSE... - RewriteRule (.*) 404.php?file=$1 + RewriteRule (.*) 404.php?file=$1 # END