Welcome! Log In Create A New Profile

Advanced

corrupted cache file: proxy_cache_valid ignored

February 08, 2022 02:44AM
Hello,

we have observed a case where it seems that the proxy_cache_valid directive is ignored.

nginx version: 1.19.9

Config: proxy_cache_valid 200 206 30d;

Scenario:
* A cache file was corrupted (a file system issue). A part of the section that contains the headers had been overwritten with binary data.
* The resource represented by the corrupted cache file is requested.
* NGINX detects the corrupted cache file, and proxies the request upstream.
* The request is rejected by the upstream, with the upstream returning a 403 status.
* The 403 is returned to the client.
This is all good, but
* The request is repeated, and a cached 403 is returned, despite only caching 200 and 206.
* Upon examination, the cache file contains the 403 response from upstream.

Has anyone else seen something like this? Could this possibly be a bug?

Unfortunately I am not in a position to try to reproduce this at this time.

Thanks…

Roger




_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

corrupted cache file: proxy_cache_valid ignored

roger_bc February 08, 2022 02:44AM

Re: corrupted cache file: proxy_cache_valid ignored

Maxim Dounin February 08, 2022 08:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 211
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready