forked from DebaucheryLibrarian/traxxx
Explicitly adding headers to http module result.
This commit is contained in:
parent
0a8a7ff9a5
commit
2be3ea9bbb
|
@ -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']]
|
||||
|
|
|
@ -122,6 +122,7 @@ async function finalizeResult(res, options) {
|
|||
body: html,
|
||||
html,
|
||||
status: res.statusCode,
|
||||
headers: res.headers,
|
||||
document: window?.document || null,
|
||||
window,
|
||||
ok: res.statusCode >= 200 && res.statusCode <= 299,
|
||||
|
@ -132,6 +133,7 @@ async function finalizeResult(res, options) {
|
|||
...res,
|
||||
body: res.body,
|
||||
status: res.statusCode,
|
||||
headers: res.headers,
|
||||
ok: res.statusCode >= 200 && res.statusCode <= 299,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue