comparison 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
comparison
equal deleted inserted replaced
145:85a84f8da62b 146:36af50a5582d
97 ngx_conf_check_num_bounds, 1, 9 97 ngx_conf_check_num_bounds, 1, 9
98 }; 98 };
99 99
100 static ngx_conf_post_handler_pt ngx_http_gzip_window_p = ngx_http_gzip_window; 100 static ngx_conf_post_handler_pt ngx_http_gzip_window_p = ngx_http_gzip_window;
101 static ngx_conf_post_handler_pt ngx_http_gzip_hash_p = ngx_http_gzip_hash; 101 static ngx_conf_post_handler_pt ngx_http_gzip_hash_p = ngx_http_gzip_hash;
102
103 102
104 103
105 static ngx_conf_enum_t ngx_http_gzip_http_version[] = { 104 static ngx_conf_enum_t ngx_http_gzip_http_version[] = {
106 { ngx_string("1.0"), NGX_HTTP_VERSION_10 }, 105 { ngx_string("1.0"), NGX_HTTP_VERSION_10 },
107 { ngx_string("1.1"), NGX_HTTP_VERSION_11 }, 106 { ngx_string("1.1"), NGX_HTTP_VERSION_11 },
281 if (!conf->enable 280 if (!conf->enable
282 || (r->headers_out.status != NGX_HTTP_OK 281 || (r->headers_out.status != NGX_HTTP_OK
283 && r->headers_out.status != NGX_HTTP_FORBIDDEN 282 && r->headers_out.status != NGX_HTTP_FORBIDDEN
284 && r->headers_out.status != NGX_HTTP_NOT_FOUND) 283 && r->headers_out.status != NGX_HTTP_NOT_FOUND)
285 || r->header_only 284 || r->header_only
286 || r->main != r 285 || r != r->main
287 || r->http_version < conf->http_version 286 || r->http_version < conf->http_version
288 || r->headers_out.content_type.len == 0 287 || r->headers_out.content_type.len == 0
289 || (r->headers_out.content_encoding 288 || (r->headers_out.content_encoding
290 && r->headers_out.content_encoding->value.len) 289 && r->headers_out.content_encoding->value.len)
291 || r->headers_in.accept_encoding == NULL 290 || r->headers_in.accept_encoding == NULL
542 if (ngx_http_next_body_filter(r, &out) == NGX_ERROR) { 541 if (ngx_http_next_body_filter(r, &out) == NGX_ERROR) {
543 ngx_http_gzip_error(ctx); 542 ngx_http_gzip_error(ctx);
544 return NGX_ERROR; 543 return NGX_ERROR;
545 } 544 }
546 545
546 r->connection->buffered |= NGX_HTTP_GZIP_BUFFERED;
547
547 ctx->last_out = &ctx->out; 548 ctx->last_out = &ctx->out;
548 549
549 ctx->crc32 = crc32(0L, Z_NULL, 0); 550 ctx->crc32 = crc32(0L, Z_NULL, 0);
550 ctx->flush = Z_NO_FLUSH; 551 ctx->flush = Z_NO_FLUSH;
551 } 552 }
797 ctx->zstream.avail_in = 0; 798 ctx->zstream.avail_in = 0;
798 ctx->zstream.avail_out = 0; 799 ctx->zstream.avail_out = 0;
799 800
800 ctx->done = 1; 801 ctx->done = 1;
801 802
803 r->connection->buffered &= ~NGX_HTTP_GZIP_BUFFERED;
804
802 break; 805 break;
803 } 806 }
804 807
805 if (conf->no_buffer && ctx->in == NULL) { 808 if (conf->no_buffer && ctx->in == NULL) {
806 809