]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) mod_filter: enable filtering of errordocuments. PR 48377
authorJim Jagielski <jim@apache.org>
Mon, 12 Jul 2010 18:49:31 +0000 (18:49 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 12 Jul 2010 18:49:31 +0000 (18:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@963431 13f79535-47bb-0310-9956-ffa450edef68

STATUS
docs/manual/mod/mod_filter.xml
modules/filters/mod_filter.c

diff --git a/STATUS b/STATUS
index fd9fcd0987d2f26237325a248f18318fa81665ad..d43247ea231e99067292cc0b0d1896c0f074a47e 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -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:
index f754e6807489c1d77075d5c44f18a31ffceb907f..3ef642e754e1875a581b3a90832048246d0c8949 100644 (file)
     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>
index 7389364246748ff9bd92416f21271d9802c2fee3..c09f3f937e6a559bfdde9d05fe8a683df4c5a4fc 100644 (file)
@@ -346,7 +346,8 @@ static apr_status_t filter_harness(ap_filter_t *f, apr_bucket_brigade *bb)
     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);
     }