Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_file_cache.c @ 528:005a70f9573b NGINX_0_8_16
nginx 0.8.16
*) Feature: the "image_filter_transparency" directive.
*) Bugfix: "addition_types" directive was incorrectly named
"addtion_types".
*) Bugfix: resolver cache poisoning.
Thanks to Matthew Dempsky.
*) Bugfix: memory leak in resolver.
Thanks to Matthew Dempsky.
*) Bugfix: invalid request line in $request variable was written in
access_log only if error_log was set to "info" or "debug" level.
*) Bugfix: in PNG alpha-channel support in the
ngx_http_image_filter_module.
*) Bugfix: nginx always added "Vary: Accept-Encoding" response header
line, if both "gzip_static" and "gzip_vary" were on.
*) Bugfix: in UTF-8 encoding support by "try_files" directive in
nginx/Windows.
*) Bugfix: in "post_action" directive usage; the bug had appeared in
0.8.11.
Thanks to Igor Artemiev.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 22 Sep 2009 00:00:00 +0400 |
parents | 86dad910eeb6 |
children | f7ec98e3caeb |
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -767,6 +767,7 @@ ngx_http_file_cache_update(ngx_http_requ ngx_int_t ngx_http_cache_send(ngx_http_request_t *r) { + off_t size; ngx_int_t rc; ngx_buf_t *b; ngx_chain_t out; @@ -795,10 +796,15 @@ ngx_http_cache_send(ngx_http_request_t * return rc; } + size = c->length - c->body_start; + if (size == 0) { + return rc; + } + b->file_pos = c->body_start; b->file_last = c->length; - b->in_file = (c->length - c->body_start) ? 1: 0; + b->in_file = size ? 1: 0; b->last_buf = (r == r->main) ? 1: 0; b->last_in_chain = 1;