diff --git a/src/resource-archive/index.test.ts b/src/resource-archive/index.test.ts index 8a4213c6..8b99760b 100644 --- a/src/resource-archive/index.test.ts +++ b/src/resource-archive/index.test.ts @@ -129,7 +129,7 @@ describe('new', () => { statusCode: 200, statusText: 'OK', body: Buffer.from(imgPng, 'base64'), - contentType: undefined, + contentType: 'image/png', }, }); }); @@ -155,7 +155,7 @@ describe('new', () => { statusCode: 200, statusText: 'OK', body: Buffer.from(imgPng, 'base64'), - contentType: undefined, + contentType: 'image/png', }, }); }); @@ -195,7 +195,7 @@ describe('new', () => { statusCode: 200, statusText: 'OK', body: Buffer.from(imgPng, 'base64'), - contentType: undefined, + contentType: 'image/png', }, // includes cross-origin images 'https://i-ama.fake/external/domain/image.png': { diff --git a/src/resource-archive/index.ts b/src/resource-archive/index.ts index d03ff3cd..a6cf9975 100644 --- a/src/resource-archive/index.ts +++ b/src/resource-archive/index.ts @@ -184,7 +184,7 @@ class Watcher { // If the Content-Type header is present, let's capture it. const contentTypeHeader: Protocol.Fetch.HeaderEntry = responseHeaders.find( - ({ name }) => name === 'Content-Type' + ({ name }) => name.toLowerCase() === 'content-type' ); // No need to capture the response of the top level page request