changeset 3971:44f4fc874b2f

do not close connection if cache file is too small: replace it with valid one
author Igor Sysoev <igor@sysoev.ru>
date Sun, 24 Jul 2011 20:04:47 +0000
parents 2d05952a324d
children c1a69e03bdf2
files src/http/ngx_http_file_cache.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -376,7 +376,7 @@ ngx_http_file_cache_read(ngx_http_reques
     if ((size_t) n < c->header_start) {
         ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
                       "cache file \"%s\" is too small", c->file.name.data);
-        return NGX_ERROR;
+        return NGX_DECLINED;
     }
 
     h = (ngx_http_file_cache_header_t *) c->buf->pos;