Skip to content

Commit

Permalink
Accept X-Content-Length as fallback too (#485)
Browse files Browse the repository at this point in the history
* Accept X-Content-Length as fallback too

* Remove debugger
  • Loading branch information
Duddino authored Dec 7, 2024
1 parent d029156 commit 3dc0dfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export class Reader {
*/
constructor(req) {
this.#availableBytes = new Uint8Array(
req.headers?.get('Content-Length') || 1024
req.headers?.get('Content-Length') ||
req.headers?.get('X-Content-Length') ||
1024
);
const stream = req.body.getReader();
(async () => {
Expand Down

0 comments on commit 3dc0dfa

Please sign in to comment.