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, 28 Jul 2003 02:05:57 GMT
jerenkrantz    2003/07/27 19:05:57

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES
               modules/filters Tag: APACHE_2_0_BRANCH 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).
  
  Reviewed by:	Sander Striker, Andre Malo
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.142 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.141
  retrieving revision 1.988.2.142
  diff -u -u -r1.988.2.141 -r1.988.2.142
  --- CHANGES	28 Jul 2003 02:02:25 -0000	1.988.2.141
  +++ CHANGES	28 Jul 2003 02:05:56 -0000	1.988.2.142
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.48
   
  +  *) mod_deflate: Don't attempt to hold all of the response until we're
  +     done.  [Justin Erenkrantz]
  +
     *) Assure that we block properly when reading input bodies with SSL.
        PR 19242.  [David Deaves <David.Deaves@dd.id.au>, William Rowe]
   
  
  
  
  No                   revision
  No                   revision
  1.26.2.6  +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.26.2.5
  retrieving revision 1.26.2.6
  diff -u -u -r1.26.2.5 -r1.26.2.6
  --- mod_deflate.c	17 May 2003 18:27:43 -0000	1.26.2.5
  +++ mod_deflate.c	28 Jul 2003 02:05:57 -0000	1.26.2.6
  @@ -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