mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
RequestServer: Delete unreadable cache files (for now)
If we are unable to pipe the response body from a cache file to the client, let's take the extra safe approach of deleting the cache file for now. We already remove the file if we weren't able to read its metadata during initialization.
This commit is contained in:
parent
27cb5d8c1e
commit
fc9233f198
Notes:
github-actions[bot]
2025-10-16 13:08:01 +00:00
Author: https://github.com/trflynn89
Commit: fc9233f198
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6487
Reviewed-by: https://github.com/gmta
1 changed files with 4 additions and 0 deletions
|
@ -346,6 +346,10 @@ void CacheEntryReader::pipe_error(Error error)
|
||||||
{
|
{
|
||||||
dbgln("\033[31;1mError transferring cache to pipe for\033[0m {}: {}", m_url, error);
|
dbgln("\033[31;1mError transferring cache to pipe for\033[0m {}: {}", m_url, error);
|
||||||
|
|
||||||
|
// FIXME: We may not want to actually remove the cache file for all errors. For now, let's assume the file is not
|
||||||
|
// useable at this point and remove it.
|
||||||
|
remove();
|
||||||
|
|
||||||
if (m_on_pipe_error)
|
if (m_on_pipe_error)
|
||||||
m_on_pipe_error(m_bytes_piped);
|
m_on_pipe_error(m_bytes_piped);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue