Skip to content

Commit

Permalink
Force content-length in web fetching.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Sep 11, 2020
1 parent bc3eeec commit be92339
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/web/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } = { };
Expand Down

0 comments on commit be92339

Please sign in to comment.