httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r416165 - /httpd/httpd/trunk/modules/filters/mod_deflate.c
Date Wed, 21 Jun 2006 23:38:45 GMT


On 06/22/2006 01:16 AM, wrote:
> Author: niq
> Date: Wed Jun 21 16:16:47 2006
> New Revision: 416165
> 
> URL: http://svn.apache.org/viewvc?rev=416165&view=rev
> Log:
> PR#39854
> Remove bogus code that chokes on flush buckets
> 
>  
>          if (APR_BUCKET_IS_FLUSH(bkt)) {
> -            apr_bucket *tmp_heap;
> -            zRC = inflate(&(ctx->stream), Z_SYNC_FLUSH);
> -            if (zRC != Z_OK) {
> -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
> -                              "Inflate error %d on flush", zRC);
> -                inflateEnd(&ctx->stream);
> -                return APR_EGENERAL;
> -            }
> -
> -            ctx->stream.next_out = ctx->buffer;
> -            len = c->bufferSize - ctx->stream.avail_out;
> -
> -            ctx->crc = crc32(ctx->crc, (const Bytef *)ctx->buffer, len);
> -            tmp_heap = apr_bucket_heap_create((char *)ctx->buffer, len,
> -                                             NULL, f->c->bucket_alloc);
> -            APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, tmp_heap);
> -            ctx->stream.avail_out = c->bufferSize;
> -
> -            /* Move everything to the returning brigade. */
> -            APR_BUCKET_REMOVE(bkt);
> -            break;
> +            continue;

Is this correct? In fact you ignore flush buckets now. Shouldn't you add the flush bucket
to
ctx->proc_bb, pass it up the chain, clean ctx->proc_bb afterwards and break if the result
is not
ok?

Regards

RĂ¼diger

Mime
View raw message