Skip to content
This repository was archived by the owner on Oct 12, 2021. It is now read-only.

fix(AppShell): handle case when there is whitespace in the resource mime type #83

Merged
merged 1 commit into from
Jul 13, 2016
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export abstract class ResourceInlineVisitor extends NodeVisitor {
return response.arrayBuffer()
.then((arr: ArrayBuffer) => [
btoa(String.fromCharCode.apply(null, new Uint8Array(arr))),
response.headers.get('content-type')
// Can contain whitespace: 'image/jpg; charset=utf-8'
response.headers.get('content-type').replace(/\s/g, '')
]);
} else {
return null;
Expand Down