diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2010-04-01 10:18:00 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2010-04-01 10:18:00 +0000 |
| commit | 07db3a4163dd413c35a6b1411bd1f86d872beb85 (patch) | |
| tree | 33f93a8ea86509b30e1166335c6c36cf49b98156 /src/http/modules | |
| parent | 569f95818b69792cd1cd36a98f0b54b8dd2c067e (diff) | |
| download | nginx-07db3a4163dd413c35a6b1411bd1f86d872beb85.tar.gz nginx-07db3a4163dd413c35a6b1411bd1f86d872beb85.tar.bz2 | |
chunked_transfer_encoding
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_chunked_filter_module.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_chunked_filter_module.c b/src/http/modules/ngx_http_chunked_filter_module.c index 25b7fe8e8..9c4c5de14 100644 --- 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 ngx_http_next_body_filter; 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_request_t *r) 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; + } } } |
