]> git.kaiwu.me - nginx.git/commitdiff
do not close connection if cache file is too small: replace it with valid one
authorIgor Sysoev <igor@sysoev.ru>
Sun, 24 Jul 2011 20:04:47 +0000 (20:04 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 24 Jul 2011 20:04:47 +0000 (20:04 +0000)
src/http/ngx_http_file_cache.c

index 24bb5494aac7f0c49ed34aa2e487e82d0dc029f1..0d5880642314b6242bb3ca11a701209e4b3bb734 100644 (file)
@@ -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;