creationix/http-parser-js

maxHeaderSize It should be an instance property, not a static property of the constructor.

Closed this issue · 4 comments

maxHeaderSize It should be an instance property, not a static property of the constructor.

HTTPParser.maxHeaderSize = 80 * 1024; // maxHeaderSize (in bytes) is configurable, but 80kb by default;

https://nodejs.org/dist/latest-v18.x/docs/api/http.html#httpmaxheadersize

This can be overridden for servers and client requests by passing the maxHeaderSize option.

if (this.headerSize > HTTPParser.maxHeaderSize) {

I suspect it needs to be both to keep compatibility with both old users and the new Node API.

I suspect it needs to be both to keep compatibility with both old users and the new Node API.

 if  ( this . headerSize  > (this.maxHeaderSize || HTTPParser . maxHeaderSize ))  {