diff options
author | Christian Hesse <mail@eworm.de> | 2022-09-15 13:57:27 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-09-15 15:38:47 +0200 |
commit | ac886bea59fe3e8b9b136f2a650b43dafae6a1b3 (patch) | |
tree | 35d242a1537ef464896083e93d56a8b19ed5503e /README.md | |
parent | 9bebcd9c517e575a023be0d1843acc4054d1363e (diff) | |
download | pacredir-ac886bea59fe3e8b9b136f2a650b43dafae6a1b3.tar.gz pacredir-ac886bea59fe3e8b9b136f2a650b43dafae6a1b3.tar.zst |
use http header 'Cache-Control: no-cache' for soft failure
This is standard header...
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -99,16 +99,17 @@ This is the simplest workaround - just disable the server error limit. We can agree this is not to be desired - in general the feature is reasonable. -### Support http header to indicate an expected failure +### Support http header to indicate a soft failure This solution is simple, yet powerful: -[Support http header to indicate an expected failure](patches/0001-support-http-header-to-indicate-an-expected-failure.patch) +[Support http header 'Cache-Control: no-cache' for soft failure](patches/0001-support-http-header-Cache-Control-no-cache-for-soft-failure.patch) -By setting an extra HTTP header `X-Pacman-Expected-Failure` the server can -indicate that the failure is expected. The next server is tried without -error message and without increasing the server's error count. +By setting the HTTP header `Cache-Control: no-cache` when returning with +the status code `404` (not found) the server can indicate that this is a +soft failure. No error message is shown, and server's error count is +not increased. -Sadly upstream denied. 😢 +Sadly upstream denied. 😢 (At least an earlier version of the patch...) ### Implement CacheServer |