Force content-length in web fetching.
This commit is contained in:
parent
bc3eeeca39
commit
be92339696
@ -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 } = { };
|
||||
|
Loading…
Reference in New Issue
Block a user