From d8ce166e2e51de1bc179420c7faae7176d64cc07 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 24 Jul 2011 20:04:47 +0000 Subject: [PATCH] do not close connection if cache file is too small: replace it with valid one --- src/http/ngx_http_file_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c index 24bb5494a..0d5880642 100644 --- 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_request_t *r, ngx_http_cache_t *c) 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;