You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2010/07/12 20:49:31 UTC

svn commit: r963431 - in /httpd/httpd/branches/2.2.x: STATUS docs/manual/mod/mod_filter.xml modules/filters/mod_filter.c

Author: jim
Date: Mon Jul 12 18:49:31 2010
New Revision: 963431

URL: http://svn.apache.org/viewvc?rev=963431&view=rev
Log:
*) mod_filter: enable filtering of errordocuments.  PR 48377

Modified:
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/docs/manual/mod/mod_filter.xml
    httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=963431&r1=963430&r2=963431&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Mon Jul 12 18:49:31 2010
@@ -86,9 +86,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_filter: enable filtering of errordocuments.  PR 48377
-     http://svn.apache.org/viewvc?view=revision&revision=894041
-     +1: niq, rjung, jim
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:

Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_filter.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_filter.xml?rev=963431&r1=963430&r2=963431&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_filter.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_filter.xml Mon Jul 12 18:49:31 2010
@@ -125,6 +125,13 @@
     filters declared, offering the flexibility to insert filters at the
     beginning or end of the chain, remove a filter, or clear the chain.</dd>
 </dl>
+<section id="errordocs"><title>Filtering and Response Status</title>
+    <p>mod_filter normally only runs filters on responses with
+    HTTP status 200 (OK).  If you want to filter documents with
+    other response statuses, you can set the <var>filter-errordocs</var>
+    environment variable, and it will work on all responses
+    regardless of status.  To refine this further, you can use
+    expression conditions with <directive>FilterProvider</directive>.</p>
 </section>
 
 <section id="examples"><title>Examples</title>

Modified: httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c?rev=963431&r1=963430&r2=963431&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c (original)
+++ httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c Mon Jul 12 18:49:31 2010
@@ -346,7 +346,8 @@ static apr_status_t filter_harness(ap_fi
     harness_ctx *ctx = f->ctx;
     ap_filter_rec_t *filter = f->frec;
 
-    if (f->r->status != 200) {
+    if (f->r->status != 200
+        && !apr_table_get(f->r->subprocess_env, "filter-errordocs")) {
         ap_remove_output_filter(f);
         return ap_pass_brigade(f->next, bb);
     }