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 Tue, 22 Jul 2003 05:36:54 GMT
jerenkrantz    2003/07/21 22:36:54

  Modified:    .        CHANGES
               modules/filters mod_deflate.c
  Log:
  Don't attempt to hold all of the response until we're done.  We'll pass data on
  when the zlib buffer becomes full and we need to reset the buffer anyway.
  
  Also, tidy up a similar semantic when we see the EOS by returning an error
  if ap_pass_brigade gets an error (we'd lose it otherwise).
  
  Revision  Changes    Path
  1.1236    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1235
  retrieving revision 1.1236
  diff -u -u -r1.1235 -r1.1236
  --- CHANGES	21 Jul 2003 23:47:31 -0000	1.1235
  +++ CHANGES	22 Jul 2003 05:36:52 -0000	1.1236
  @@ -2,6 +2,9 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_deflate: Don't attempt to hold all of the response until we're
  +     done.  [Justin Erenkrantz]
  +
     *) mod_include: Fix a trio of bugs that would cause various unusual
        sequences of parsed bytes to omit portions of the output stream.
        PR 21095. [Ron Park <ronald.park@cnet.com>, André Malo, Cliff Woolley]
  
  
  
  1.35      +13 -1     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.34
  retrieving revision 1.35
  diff -u -u -r1.34 -r1.35
  --- mod_deflate.c	16 May 2003 22:49:04 -0000	1.34
  +++ mod_deflate.c	22 Jul 2003 05:36:54 -0000	1.35
  @@ -529,6 +529,8 @@
   
           if (APR_BUCKET_IS_FLUSH(e)) {
               apr_bucket *bkt;
  +            apr_status_t rv;
  +
               zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
               if (zRC != Z_OK) {
                   return APR_EGENERAL;
  @@ -544,7 +546,10 @@
   
               bkt = apr_bucket_flush_create(f->c->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(ctx->bb, bkt);
  -            ap_pass_brigade(f->next, ctx->bb);
  +            rv = ap_pass_brigade(f->next, ctx->bb);
  +            if (rv != APR_SUCCESS) {
  +                return rv;
  +            }
               continue;
           }
   
  @@ -562,6 +567,8 @@
   
           while (ctx->stream.avail_in != 0) {
               if (ctx->stream.avail_out == 0) {
  +                apr_status_t rv;
  +
                   ctx->stream.next_out = ctx->buffer;
                   len = c->bufferSize - ctx->stream.avail_out;
   
  @@ -569,6 +576,11 @@
                                              NULL, f->c->bucket_alloc);
                   APR_BRIGADE_INSERT_TAIL(ctx->bb, b);
                   ctx->stream.avail_out = c->bufferSize;
  +                /* Send what we have right now to the next filter. */
  +                rv = ap_pass_brigade(f->next, ctx->bb);
  +                if (rv != APR_SUCCESS) {
  +                    return rv;
  +                }
               }
   
               zRC = deflate(&(ctx->stream), Z_NO_FLUSH);
  
  
  

Mime
View raw message