do not close connection if cache file is too small: replace it with valid one

This commit is contained in:
Igor Sysoev 2011-07-24 20:04:47 +00:00
parent c2cafadfa5
commit d8ce166e2e

View 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;