From b278f422bfe58640feb2b1bae440625bba29fb64 Mon Sep 17 00:00:00 2001 From: MrGlp <781566483@qq.com> Date: Fri, 20 Mar 2026 16:21:05 +0800 Subject: [PATCH] Fix the problem of 500 caused by insufficient zone of proxy cache --- src/http/ngx_http_file_cache.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c index 5209f003b..70a675ed6 100644 --- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -301,11 +301,7 @@ ngx_http_file_cache_open(ngx_http_request_t *r) ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http file cache exists: %i e:%d", rc, c->exists); - if (rc == NGX_ERROR) { - return rc; - } - - if (rc == NGX_AGAIN) { + if (rc == NGX_AGAIN || rc == NGX_ERROR) { return NGX_HTTP_CACHE_SCARCE; }