]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/filters/mod_ext_filter.c (ef_unified_filter): Set hit_eos
authorJoe Orton <jorton@apache.org>
Thu, 5 Jul 2012 15:33:18 +0000 (15:33 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 5 Jul 2012 15:33:18 +0000 (15:33 +0000)
  flag on hitting EOS.
  (ef_input_filter): Give back EOS if filter is invoked after hitting
  EOS, rather than attempting (and failing) to read from the closed
  pipe to the child.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1357685 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_ext_filter.c

diff --git a/CHANGES b/CHANGES
index bc8b9eef4b52440c17a1483b96838b097a9277c2..2fc68fb3b22743359051267d0f1060eabf2f5b4c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_ext_filter: Fix error_log spam when input filters are configured.  
+     [Joe Orton]
+
   *) mod_rewrite: Add "AllowAnyURI" option. PR 52774. [Joe Orton]
 
   *) mod_ssl: Add RFC 5878 support. [Ben Laurie]
index bbe93269f898574768a845af92d556da871568dc..658c121a0ba39a700d066f65fbea983c5ce5d792 100644 (file)
@@ -66,7 +66,7 @@ typedef struct ef_ctx_t {
     apr_procattr_t *procattr;
     ef_dir_t *dc;
     ef_filter_t *filter;
-    int noop;
+    int noop, hit_eos;
 #if APR_FILES_AS_SOCKETS
     apr_pollset_t *pollset;
 #endif
@@ -827,6 +827,7 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
     if (eos) {
         b = apr_bucket_eos_create(c->bucket_alloc);
         APR_BRIGADE_INSERT_TAIL(bb, b);
+        ctx->hit_eos = 1;
     }
 
     return APR_SUCCESS;
@@ -910,6 +911,14 @@ static apr_status_t ef_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
         ctx = f->ctx;
     }
 
+    if (ctx->hit_eos) {
+        /* Match behaviour of HTTP_IN if filter is re-invoked after
+         * hitting EOS: give back another EOS. */
+        apr_bucket *e = apr_bucket_eos_create(f->c->bucket_alloc);
+        APR_BRIGADE_INSERT_TAIL(bb, e);
+        return APR_SUCCESS;
+    }
+
     if (ctx->noop) {
         ap_remove_input_filter(f);
         return ap_get_brigade(f->next, bb, mode, block, readbytes);