Mercurial > hg > nginx
diff src/http/modules/ngx_http_chunked_filter_module.c @ 3484:81457372d938
chunked_transfer_encoding
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 01 Apr 2010 10:18:00 +0000 |
parents | 50ad44defdbb |
children | a28ba1cdec27 525a34d74a0a |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_chunked_filter_module.c +++ b/src/http/modules/ngx_http_chunked_filter_module.c @@ -50,6 +50,8 @@ static ngx_http_output_body_filter_pt static ngx_int_t ngx_http_chunked_header_filter(ngx_http_request_t *r) { + ngx_http_core_loc_conf_t *clcf; + if (r->headers_out.status == NGX_HTTP_NOT_MODIFIED || r->headers_out.status == NGX_HTTP_NO_CONTENT || r != r->main @@ -63,7 +65,14 @@ ngx_http_chunked_header_filter(ngx_http_ r->keepalive = 0; } else { - r->chunked = 1; + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + + if (clcf->chunked_transfer_encoding) { + r->chunked = 1; + + } else { + r->keepalive = 0; + } } }