Changeset 95d817


Ignore:
Timestamp:
02/04/08 16:11:29 (4 years ago)
Author:
Tomash Brechko <tomash.brechko@…>
Branches:
master-v0.7, gunzip, master-v0.6, memcached_gzip, upstream_count_limit
Children:
88f48a, 56389f
Parents:
ec81a7
git-author:
Tomash Brechko <tomash.brechko@…> (02/04/08 16:11:29)
git-committer:
Tomash Brechko <tomash.brechko@…> (02/04/08 16:11:29)
Message:

Do not output empty buffers on decompression.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/src/http/modules/ngx_http_gzip_filter_module.c

    rec81a7 r95d817  
    626626                } 
    627627 
    628                 cl->buf = ctx->out_buf; 
    629                 cl->next = NULL; 
    630                 *ctx->last_out = cl; 
    631                 ctx->last_out = &cl->next; 
     628                /* 
     629                 * On decompression we could already output everything 
     630                 * under (ctx->flush == Z_SYNC_FLUSH), so we test here 
     631                 * that the buffer is not empty. 
     632                 */ 
     633                if (!r->gunzip || ctx->out_buf->last > ctx->out_buf->pos) { 
     634                    cl->buf = ctx->out_buf; 
     635                    cl->next = NULL; 
     636                    *ctx->last_out = cl; 
     637                    ctx->last_out = &cl->next; 
     638                } 
    632639 
    633640                if (!r->gunzip) { 
Note: See TracChangeset for help on using the changeset viewer.