mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibHTTP: Do not respond to Range requests with cached full responses
If we have the response for a non-Range request in the memory cache, we would previously use it in reply to Range requests. Similar to commit 878b00ae61f998a26aad7f50fae66cf969878ad6, we are just punting on Range requests in the HTTP caches for now.
This commit is contained in:
Notes:
github-actions[bot]
2026-01-10 14:03:35 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/453764d3f00 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7402
@@ -21,6 +21,9 @@ Optional<MemoryCache::Entry const&> MemoryCache::open_entry(URL::URL const& url,
|
||||
// When presented with a request, a cache MUST NOT reuse a stored response unless:
|
||||
// - the presented target URI (Section 7.1 of [HTTP]) and that of the stored response match, and
|
||||
// - the request method associated with the stored response allows it to be used for the presented request, and
|
||||
if (!is_cacheable(method, request_headers))
|
||||
return {};
|
||||
|
||||
auto serialized_url = serialize_url_for_cache_storage(url);
|
||||
auto cache_key = create_cache_key(serialized_url, method);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user