Explicitly adding headers to http module result.

This commit is contained in:
DebaucheryLibrarian
2021-11-21 00:41:12 +01:00
parent 0a8a7ff9a5
commit 2be3ea9bbb
2 changed files with 4 additions and 0 deletions

View File

@@ -549,6 +549,8 @@ async function fetchHttpSource(source, tempFileTarget, hashStream) {
throw new Error(`Response ${res.status} not OK`);
}
console.log(res.headers);
return {
mimetype: (source.expectType
? source.expectType[res.headers['content-type']]