Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_file_cache.c @ 558:2da4537168f8 NGINX_0_8_31
nginx 0.8.31
*) Feature: now the "error_page" directive may redirect the 301 and 302
responses.
*) Feature: the $geoip_city_continent_code, $geoip_latitude, and
$geoip_longitude variables.
Thanks to Arvind Sundararajan.
*) Feature: now the ngx_http_image_filter_module deletes always EXIF
and other application specific data if the data consume more than 5%
of a JPEG file.
*) Bugfix: nginx closed a connection if a cached response had an empty
body.
Thanks to Piotr Sikora.
*) Bugfix: nginx might not be built by gcc 4.x if the -O2 or higher
optimization option was used.
Thanks to Maxim Dounin and Denis F. Latypoff.
*) Bugfix: regular expressions in location were always tested in
case-sensitive mode; the bug had appeared in 0.8.25.
*) Bugfix: nginx cached a 304 response if there was the "If-None-Match"
header line in a proxied request.
Thanks to Tim Dettrick and David Kostal.
*) Bugfix: nginx/Windows tried to delete a temporary file twice if the
file should replace an already existent file.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 23 Dec 2009 00:00:00 +0300 |
parents | 5c576ea5dbd9 |
children | da3c99095432 |
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -783,7 +783,6 @@ 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; @@ -806,21 +805,18 @@ ngx_http_cache_send(ngx_http_request_t * return NGX_HTTP_INTERNAL_SERVER_ERROR; } + r->header_only = (c->length - c->body_start) == 0; + rc = ngx_http_send_header(r); if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { 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 = size ? 1: 0; + b->in_file = 1; b->last_buf = (r == r->main) ? 1: 0; b->last_in_chain = 1;