<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello, <div class=""><br class=""></div><div class="">we have observed a case where it seems that the <span style="font-family: Menlo;" class="">proxy_cache_valid</span> directive is ignored.</div><div class=""><br class=""></div><div class="">nginx version: <span style="font-family: Menlo;" class="">1.19.9</span></div><div class=""><br class=""></div><div class="">Config: <span style="font-family: Menlo;" class="">proxy_cache_valid 200 206 30d;</span></div><div class=""><br class=""></div><div class="">Scenario:</div><div class="">* A cache file was corrupted (a file system issue). A part of the section that contains the headers had been overwritten with binary data.</div><div class="">* The resource represented by the corrupted cache file is requested.</div><div class="">* NGINX detects the corrupted cache file, and proxies the request upstream.</div><div class="">* The request is rejected by the upstream, with the upstream returning a 403 status.</div><div class="">* The 403 is returned to the client.</div><div class="">This is all good, but</div><div class="">* The request is repeated, and a cached 403 is returned, despite only caching 200 and 206.</div><div class="">* Upon examination, the cache file contains the 403 response from upstream.</div><div class=""><br class=""></div><div class="">Has anyone else seen something like this? Could this possibly be a bug?</div><div class=""><br class=""></div><div class="">Unfortunately I am not in a position to try to reproduce this at this time.</div><div class=""><br class=""></div><div class="">Thanks…</div><div class=""><br class=""></div><div class="">Roger</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>