Add 'Content-Length' for cacheStorage

This commit is contained in:
Eduard Kuzmenko 2021-05-16 05:21:41 +04:00
parent 2e617fc05d
commit f12b693e0f

View File

@ -62,7 +62,13 @@ export default class CacheStorageController {
blob = blobConstruct(blob) as Blob;
}
return this.save(fileName, new Response(blob)).then(() => {
const response = new Response(blob, {
headers: {
'Content-Length': '' + blob.size
}
});
return this.save(fileName, response).then(() => {
return blob as Blob;
});
}