Browse Source

Add 'Content-Length' for cacheStorage

master
Eduard Kuzmenko 4 years ago
parent
commit
f12b693e0f
  1. 8
      src/lib/cacheStorage.ts

8
src/lib/cacheStorage.ts

@ -62,7 +62,13 @@ export default class CacheStorageController {
blob = blobConstruct(blob) as Blob; 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; return blob as Blob;
}); });
} }

Loading…
Cancel
Save