httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r475406 - /httpd/httpd/trunk/modules/filters/mod_deflate.c
Date Wed, 15 Nov 2006 20:26:11 GMT
Author: rpluem
Date: Wed Nov 15 12:26:10 2006
New Revision: 475406

URL: http://svn.apache.org/viewvc?view=rev&rev=475406
Log:
* Ensure that we do not perform our final operations twice if a second EOS
  falls down the chain by accident. Otherwise we are likely to run in a
  SEGFAULT. So remove ourselves from the chain.

Modified:
    httpd/httpd/trunk/modules/filters/mod_deflate.c

Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?view=diff&rev=475406&r1=475405&r2=475406
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_deflate.c Wed Nov 15 12:26:10 2006
@@ -1001,6 +1001,12 @@
         e = APR_BRIGADE_FIRST(bb);
 
         if (APR_BUCKET_IS_EOS(e)) {
+            /*
+             * We are really done now. Ensure that we never return here, even
+             * if a second EOS bucket falls down the chain. Thus remove
+             * ourselves.
+             */
+            ap_remove_output_filter(f);
             ctx->stream.avail_in = 0; /* should be zero already anyway */
             /*
              * Flush the remaining data from the zlib buffers. It is correct



Mime
View raw message