Skip to content

Commit

Permalink
case-insensitive match on header name
Browse files Browse the repository at this point in the history
  • Loading branch information
tevanoff committed Dec 15, 2023
1 parent 946ffbf commit 9195143
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/resource-archive/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('new', () => {
statusCode: 200,
statusText: 'OK',
body: Buffer.from(imgPng, 'base64'),
contentType: undefined,
contentType: 'image/png',
},
});
});
Expand All @@ -155,7 +155,7 @@ describe('new', () => {
statusCode: 200,
statusText: 'OK',
body: Buffer.from(imgPng, 'base64'),
contentType: undefined,
contentType: 'image/png',
},
});
});
Expand Down Expand Up @@ -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': {
Expand Down
2 changes: 1 addition & 1 deletion src/resource-archive/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9195143

Please sign in to comment.