mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibWeb/Fetch: Don’t cache redirects
This change disables caching for 301, 302, 303, 307, and 308 responses. This is just for now, ad-hoc — not adhering to any particular spec. Fixes https://github.com/LadybirdBrowser/ladybird/issues/863
This commit is contained in:
parent
5f8d852dae
commit
f735c464d3
Notes:
github-actions[bot]
2024-08-01 09:40:16 +00:00
Author: https://github.com/sideshowbarker Commit: https://github.com/LadybirdBrowser/ladybird/commit/f735c464d3f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/899
1 changed files with 4 additions and 0 deletions
|
@ -1459,6 +1459,10 @@ private:
|
|||
// FIXME: Implement must-understand cache directive
|
||||
}
|
||||
|
||||
// FIXME: This is just for now, ad-hoc — not adhering to any particular spec.
|
||||
if (response.status() == 301 || response.status() == 302 || response.status() == 303 || response.status() == 307 || response.status() == 308)
|
||||
return false;
|
||||
|
||||
// - the no-store cache directive is not present in the response (see Section 5.2.2.5);
|
||||
if (request.cache_mode() == Infrastructure::Request::CacheMode::NoStore)
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue