Uh oh!
There was an error while loading. Please reload this page.
build: make HTTP_MAX_HEADER_SIZE configurable - #24716
Conversation
mcollina
commented
Nov 29, 2018
mcollina
commented
Nov 29, 2018
cc @nodejs/lts this will need to be backported on all lines. Sorry about not adding this in the security release. |
mcollina
commented
Nov 29, 2018
cc @ofrobots@zauberpony this should solve your need. @indutny@rvagg I'm not 100% sure how to pass this down to llhttp. Can you please chime in? I couldn't find where HTTP_MAX_HEADER_SIZE is used in llhttp or if it's another define. |
indutny
commented
Nov 29, 2018
|
sam-github
commented
Nov 29, 2018
Needs to also modify doc/api/errors.md, probably can't say what the limit is, but can mention that it may be other than the default in a custom node build. The limit could be surfaced through C++, into js as a constant. Isn't there a place already for configure-time constants? @jasnell ? |
rvagg
commented
Nov 30, 2018
#ifdef HTTP_MAX_HEADER_SIZE
staticconstuint64_tkMaxHeaderSize = HTTP_MAX_HEADER_SIZE;
#elsestaticconstuint64_tkMaxHeaderSize = 8 * 1024;
#endif// HTTP_MAX_HEADER_SIZEOr do we just ditch When we ditch http_parser we could make this configurable from a runtime API, so maybe retaining it will point us in that direction? We could even do it now for when compiled with llhttp I guess. |
mcollina
commented
Nov 30, 2018
@rvagg can you please clarify if I should pass down that definition to our
I think this a very good reason to switch to the new http parser for 12. |
The maximum size of headers introduced in the security release of 2018/11/27 is not configurable. This change adds a --http-max-header-size option to ./configure. See: nodejs#24693
mcollina
commented
Nov 30, 2018
I think we should do so, as changing the value at configure time would make our tests fails with the new configuration. How about |
c2716d1 to
793286cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
793286c to
c0293deComparemcollina
commented
Dec 3, 2018
CI: https://ci.nodejs.org/job/node-test-pull-request/19154/ @bnoordhuis @nodejs/build may I get a couple of LGTMs? |
richardlau
commented
Dec 3, 2018
Changes look okay to me, but if we're going to land a runtime configuration option (#24811) I would rather not add more build time configuration options. |
mcollina
commented
Dec 3, 2018
@richardlau I think both are valid. One sets the default, and the other one changes it at runtime. @cjihrig what do you think? |
cjihrig
commented
Dec 3, 2018
IMO, having a runtime option is desirable because it lets people who are impacted by our recent change continue to run an official build (and not have to build Node themselves). I'm not opposed to also having a build time setting though. |
mcollina
commented
Dec 3, 2018
I agree. |
lpinca
commented
Mar 11, 2019
Was this superseded by #24811? |
mcollina
commented
Mar 11, 2019
Not really, but there is no urgency to get it landed, and I have other prioritites atm. So, we can close. |
indutny
commented
Mar 22, 2019
Should this be ported to v8.x? |
The maximum size of headers introduced in the security release of
2018/11/27 is not configurable. This change adds a
--http-max-header-size option to ./configure.
See: #24693
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes