Force content-length in web fetching.

This commit is contained in:
Richard Moore 2020-09-11 01:10:53 -04:00
parent bc3eeeca39
commit be92339696
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -154,6 +154,9 @@ export function _fetchData<T = Uint8Array>(connection: string | ConnectionInfo,
if (headers["content-type"] == null) {
headers["content-type"] = { key: "Content-Type", value: "application/octet-stream" };
}
if (headers["content-length"] == null) {
headers["content-length"] = { key: "Content-Length", value: String(body.length) };
}
}
const flatHeaders: { [ key: string ]: string } = { };