Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/server/webkit/wkInterceptableRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class WKRouteImpl implements network.RouteDelegate {
// In certain cases, protocol will return error if the request was already canceled
// or the page was closed. We should tolerate these errors.
let mimeType = response.isBase64 ? 'application/octet-stream' : 'text/plain';
const headers = headersArrayToObject(response.headers, false /* lowerCase */);
const headers = headersArrayToObject(response.headers, true /* lowerCase */);
const contentType = headers['content-type'];
if (contentType)
mimeType = contentType.split(';')[0].trim();
Expand Down
2 changes: 1 addition & 1 deletion tests/page/page-request-fulfill.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ it('should fulfill with fetch result and overrides', async ({ page, server, isEl
response,
status: 201,
headers: {
...response.headers(),
'Content-Type': 'application/json', // Case matters for the tested behavior
'foo': 'bar'
}
});
Expand Down