creationix/http-parser-js

CR: make max header size configurable

paulrutter opened this issue · 1 comments

In our infrastructure we really need the header size to be bigger than 80kb, so i've forked to repo to increase the threshold to 1MB (see https://github.com/paulrutter/http-parser-js).

I've tried to make this configurable, so i could propose it as an PR, but i'm not sure how to proceed. The HTTPParser is instantiated in the Node.js core, so i cannot pass any configuration to the constructor.
Another solution would be to add a "GLOBAL" variable, but that's a bad practice.

So, my question is if any of you knows a solid solution for making the "maxHeaderSize" configurable instead of hard-coded?
UPDATE: created a PR, see #29.

Great stuff by the way, as it allows us to work around some other Node.js header issues as well.

Fixed.