httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1364606 - in /httpd/httpd/branches/2.4.x: CHANGES STATUS modules/filters/mod_ext_filter.c
Date Mon, 23 Jul 2012 12:23:25 GMT
Author: jim
Date: Mon Jul 23 12:23:25 2012
New Revision: 1364606

URL: http://svn.apache.org/viewvc?rev=1364606&view=rev
Log:
Merge r1357685 from trunk:

* modules/filters/mod_ext_filter.c (ef_unified_filter): Set hit_eos
  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.

Submitted by: jorton
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1364606&r1=1364605&r2=1364606&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Mon Jul 23 12:23:25 2012
@@ -45,6 +45,9 @@ Changes with Apache 2.4.3
   *) mod_log_config: Fix %{abc}C truncating cookie values at first "=".
      PR 53104. [Greg Ames]
 
+  *) mod_ext_filter: Fix error_log spam when input filters are configured.  
+     [Joe Orton]
+
   *) mod_rewrite: Add "AllowAnyURI" option. PR 52774. [Joe Orton]
 
   *) htdbm, htpasswd: Don't crash if crypt() fails (e.g. with FIPS enabled). 

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1364606&r1=1364605&r2=1364606&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Jul 23 12:23:25 2012
@@ -100,11 +100,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: trunk patch works (needs CHANGES entry)
      +1: sf, rjung, jim
 
-   * mod_ext_filter: fix error log spam with input filters
-     trunk patch: http://svn.apache.org/viewvc?rev=1357685&view=rev
-     2.4.x patch: trunk patch works
-     +1: jorton, trawick, jim
-
    * mpm_prefork: Reduce spawn rate after a child process exits due to
      unexpected poll or accept failure.
      trunk patch: http://svn.apache.org/viewvc?rev=1363183&view=rev

Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c?rev=1364606&r1=1364605&r2=1364606&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c Mon Jul 23 12:23:25 2012
@@ -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
     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_f
         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);



Mime
View raw message