www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <k...@sra-tohoku.co.jp>
Subject mod_include/7636: [PATCH] byterange on SSI puts excess buckets after error response
Date Mon, 07 May 2001 21:48:00 GMT

After some investigating, I finally came up to a patch that is small enough
to remedy the problem;
but this is really a hack. This patch only fixes those filter chain stops
by an error bucket.

The Real Solution probably is to
. objectify output_filter chain (not relying on (ap_filter_t*)f->next )
. don't reuse the output_filter chain (by reset_filters()) for error response
. provide a way to notify upstream filters that the chain has stuck

Some filters, including mod_include filter doesn't check the return
of ap_pass_brigade(), so we couldn't rely on returning errors from
intermediate filter; upstream filters still try to push on.

##dist5
#
#****** modules/http/http_protocol.c SSI/Range excess bucket elimination patch
#
# When using byterange requests on SSI documents,
# the SSI(INCLUDE) filter tries to push on things even after
# the byterange filter passed down the error bucket.
# This patch will nullify all (ap_filter_t*)f->next in reset_filter()
# on reusing filter chain for error response,
# which will disable existing filters including the upstream INCLUDE
# filter, pass down excess things via ap_pass_brigade().
#
# This is a hack; not all filter-chain-stuck circumstances may
# come to ap_send_error_response()->reset_filters() process.
#
/usr/local/gnu/bin/patch -p1 --backup --suffix=.dist6 << 'EOP'
=============================== {{{
diff -u httpd-2_0_17/modules/http/http_protocol.c.dist6 httpd-2_0_17/modules/http/http_protocol.c
--- httpd-2_0_17/modules/http/http_protocol.c.dist6	Wed Apr 25 20:05:01 2001
+++ httpd-2_0_17/modules/http/http_protocol.c	Mon May  7 21:26:45 2001
@@ -1698,6 +1698,7 @@
         }
         else {
             ap_remove_output_filter(f);
+	    f->next = NULL;	/* don't let upstream filters push on */
             f = f->next;
         }
     }
=============================== }
EOP



Mime
View raw message