From: Sara Golemon Date: Thu, 1 Apr 2004 03:52:34 +0000 (+0000) Subject: Only wind filters when appending to the read chain. X-Git-Tag: php-5.0.0RC2RC1~130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fac9416797aec0a59fbe34b8fe9187c198e9b61e;p=php Only wind filters when appending to the read chain. --- diff --git a/main/streams/filter.c b/main/streams/filter.c index 708889f97c..7e6df8663c 100644 --- a/main/streams/filter.c +++ b/main/streams/filter.c @@ -311,7 +311,7 @@ PHPAPI void php_stream_filter_append(php_stream_filter_chain *chain, php_stream_ chain->tail = filter; filter->chain = chain; - if ((stream->writepos - stream->readpos) > 0) { + if (&(stream->readfilters) == chain && (stream->writepos - stream->readpos) > 0) { /* Let's going ahead and wind anything in the buffer through this filter */ php_stream_bucket_brigade brig_in = { NULL, NULL }, brig_out = { NULL, NULL }; php_stream_bucket_brigade *brig_inp = &brig_in, *brig_outp = &brig_out;