Skip to content

Commit

Permalink
411 content-length required
Browse files Browse the repository at this point in the history
  • Loading branch information
e3dio committed Feb 21, 2022
1 parent 7d033f1 commit 7487d7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/transports-uws/polling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ export class Polling extends Transport {

const contentLengthHeader = Number(req.headers["content-length"]);
if (!contentLengthHeader) {
this.onError("invalid content-length header");
res.writeStatus("400 Invalid content-length header").end();
this.onError("content-length header required");
res.writeStatus("411 Length Required").end();
return;
}
if (contentLengthHeader > this.maxHttpBufferSize) {
Expand Down

0 comments on commit 7487d7a

Please sign in to comment.