diff src/http/modules/ngx_http_gzip_filter_module.c @ 146:36af50a5582d NGINX_0_3_20

nginx 0.3.20 *) Bugfix: in SSI handling. *) Bugfix: the ngx_http_memcached_module did not support the keys in the "/usr?args" form.
author Igor Sysoev <http://sysoev.ru>
date Wed, 11 Jan 2006 00:00:00 +0300
parents 8e6d4d96ec4c
children 54aabf2b0bc6
line wrap: on
line diff
--- a/src/http/modules/ngx_http_gzip_filter_module.c
+++ b/src/http/modules/ngx_http_gzip_filter_module.c
@@ -101,7 +101,6 @@ static ngx_conf_post_handler_pt  ngx_htt
 static ngx_conf_post_handler_pt  ngx_http_gzip_hash_p = ngx_http_gzip_hash;
 
 
-
 static ngx_conf_enum_t  ngx_http_gzip_http_version[] = {
     { ngx_string("1.0"), NGX_HTTP_VERSION_10 },
     { ngx_string("1.1"), NGX_HTTP_VERSION_11 },
@@ -283,7 +282,7 @@ ngx_http_gzip_header_filter(ngx_http_req
             && r->headers_out.status != NGX_HTTP_FORBIDDEN
             && r->headers_out.status != NGX_HTTP_NOT_FOUND)
         || r->header_only
-        || r->main != r
+        || r != r->main
         || r->http_version < conf->http_version
         || r->headers_out.content_type.len == 0
         || (r->headers_out.content_encoding
@@ -544,6 +543,8 @@ ngx_http_gzip_body_filter(ngx_http_reque
             return NGX_ERROR;
         }
 
+        r->connection->buffered |= NGX_HTTP_GZIP_BUFFERED;
+
         ctx->last_out = &ctx->out;
 
         ctx->crc32 = crc32(0L, Z_NULL, 0);
@@ -799,6 +800,8 @@ ngx_http_gzip_body_filter(ngx_http_reque
 
                 ctx->done = 1;
 
+                r->connection->buffered &= ~NGX_HTTP_GZIP_BUFFERED;
+
                 break;
             }