Improved checking for content type to allow for charset, etc.
このコミットが含まれているのは:
コミット
3695778550
@ -218,7 +218,7 @@ function run(filename) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.headers['content-type'] !== 'text/plain') {
|
if (response.headers['content-type'].indexOf('text/plain') !== 0) {
|
||||||
console.error("Fetching failed with incorrect content type %s", response.headers['content-type']);
|
console.error("Fetching failed with incorrect content type %s", response.headers['content-type']);
|
||||||
reject({ code: 2, error: "Fetching failed with incorrect content type " + response.headers['content-type'] });
|
reject({ code: 2, error: "Fetching failed with incorrect content type " + response.headers['content-type'] });
|
||||||
return;
|
return;
|
||||||
|
読み込み中…
x
新しいイシューから参照
ユーザーをブロックする