Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] http-cache fails for object URLs #5706

Open
chrisguttandin opened this issue Oct 18, 2023 · 0 comments
Open

[Bug] http-cache fails for object URLs #5706

chrisguttandin opened this issue Oct 18, 2023 · 0 comments
Labels

Comments

@chrisguttandin
Copy link
Contributor

chrisguttandin commented Oct 18, 2023

馃悶 Bug report

Description

Sometimes http-cache picks up object URLs and throws an error. I guess object URLs should be ignored as it is already the case with data URIs.

if (isDataURI(resource)) {
debug(`Check does not apply for data URIs`);
return;
}

Details

This is the error currently reported by http-cache:

blob:https://example.com/72849c07-8b96-412c-b8fe-90c63e8d2c44
Error  A 'cache-control' header is missing or empty.  http-cache
脳 Found 1 error, 0 warnings, 0 hints and 0 informations

If you agree that this is a viable fix I would be happy implement isObjectURL() similar to isDataURI() which could then be used like this to ignore object URLs, too:

if (isDataURI(resource) || isObjectURL(resource)) { 
     debug(`Check does not apply for data URIs and object URLs`); 
  
     return; 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant