httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_deflate.c
Date Mon, 13 May 2002 07:11:01 GMT
jerenkrantz    02/05/13 00:11:01

  Modified:    .        CHANGES
               modules/filters mod_deflate.c
  Log:
  Fix mod_deflate corruption when using multiple input buckets.  We should
  only clear *_out when we are the beginning or avail_out == 0.
  
  Justin was tracking this down before he went to WWDC and didn't finish
  before he left.  A (virtual) beer goes to Asada who filed this PR with
  the right patch!
  
  PR: 9014
  Submitted by:	kaz@asada.sytes.net (ASADA Kazuhisa)
  Reviewed by:	Justin Erenkrantz
  
  Revision  Changes    Path
  1.770     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.769
  retrieving revision 1.770
  diff -u -r1.769 -r1.770
  --- CHANGES	12 May 2002 08:09:13 -0000	1.769
  +++ CHANGES	13 May 2002 07:11:00 -0000	1.770
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.37
   
  +  *) Fix mod_deflate corruption when using multiple buckets.  PR 9014.
  +     [Asada Kazuhisa <kaz@asada.sytes.net>]
  +
     *) Performance enhancements for access logger when using
        default timestamp formatting  [Brian Pane]
   
  
  
  
  1.4       +4 -2      httpd-2.0/modules/filters/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_deflate.c	7 May 2002 00:35:16 -0000	1.3
  +++ mod_deflate.c	13 May 2002 07:11:01 -0000	1.4
  @@ -326,6 +326,10 @@
           apr_table_setn(r->headers_out, "Vary", "Accept-Encoding");
           apr_table_unset(r->headers_out, "Content-Length");
       }
  +    
  +    /* initialize deflate output buffer */
  +    ctx->stream.next_out = ctx->buffer;
  +    ctx->stream.avail_out = c->bufferSize;
   
       APR_BRIGADE_FOREACH(e, bb) {
           const char *data;
  @@ -436,8 +440,6 @@
                                                         * but we'll just have to
                                                         * trust zlib */
           ctx->stream.avail_in = len;
  -        ctx->stream.next_out = ctx->buffer;
  -        ctx->stream.avail_out = c->bufferSize;
   
           while (ctx->stream.avail_in != 0) {
               if (ctx->stream.avail_out == 0) {
  
  
  

Mime
View raw message