Uh oh!
There was an error while loading. Please reload this page.
cli: add --max-http-header-size flag - #24811
Conversation
mcollina
commented
Dec 3, 2018
mcollina
commented
Dec 3, 2018
I think we should expose that value as a read-only property under |
cjihrig
commented
Dec 3, 2018
Not strictly an alternative. See #24716 (comment) for my feelings on having both. |
Uh oh!
There was an error while loading. Please reload this page.
sam-github
commented
Dec 3, 2018
Probably an obvious suggestion, but perhaps you can reuse the existing tests if they are made slightly context aware wrt. the size setting, then wrap them in one that specifies a node option, like https://github.com/nodejs/node/blob/master/test/parallel/test-tls-cli-min-version-1.0.js |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
CVE-2018-12121 PR-URL: nodejs-private/node-private#143 Ref: nodejs-private/security#139 Ref: nodejs-private/http-parser-private#2 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Anna Henningsen <anna@addaleax.net>
dglozic
commented
Dec 4, 2018
Can this be back-ported to Node 8 LTS? As of v8.14.0, people blessed with domains with a lot of cookies are broken without this option, effectively preventing them from consuming any more LTS fixes (and 8.14.0 contains a security fix as well). |
d4a3a0a to
3275c64Comparecjihrig
commented
Dec 5, 2018
I think I've addressed all the nits. @mcollina, you signed off on this, but did you still want this added to the HTTP API? |
mcollina
commented
Dec 5, 2018
It would be better but it can come later if somebody needs it. |
3275c64 to
67e5595Comparecjihrig
commented
Dec 6, 2018
Opened #24860 to discuss separately. |
mcollina
commented
Dec 7, 2018
mcollina
commented
Dec 10, 2018
@cjihrig what's the status of this? |
lxe
commented
Jan 10, 2019
Thanks for this! |
pharatesid
commented
Jan 30, 2019
how do i use this feature and configure the http header size |
losdevnull
commented
Jan 30, 2019
Does this apply to https as well? It does not seem to work with https.createServer. |
mcollina
commented
Feb 2, 2019
@losdevnull it should! If not please open an new issue with a script to reproduce and tag me. |
losdevnull
commented
Feb 2, 2019
@mcollina never mind.. it turns out that we did not set the arg correctly in command line by appending it in the end instead of in front of the app to be started. After fix that it worked as expected for https. Thanks! |
| #ifndef NODE_EXPERIMENTAL_HTTP | ||
| void InitMaxHttpHeaderSizeOnce() { | ||
| const uint32_t max_http_header_size = per_process_opts->max_http_header_size; |
There was a problem hiding this comment.
Hi @cjihrig I tried to dig but couldn't figure out the answer.
Does per_process get populated with .npmrc or system environment values? Or can this only be set with the CLI option?
There was a problem hiding this comment.
You can configure this via the CLI option or NODE_OPTIONS environment variable (search the tests in this PR for NODE_OPTIONS).
mike503
commented
Feb 22, 2019
It would be great if node responded with an HTTP 413 “Request Header fields too large” (or something similar) is this was encountered instead of behaving like it is crashing (or empty return) or timing out (with nginx in front it will result in a 502/400 based on the node version or a 504 timeout) |
richardlau
commented
Feb 22, 2019
|
Allow the maximum size of HTTP headers to be overridden from the command line.
Refs: nodejs/http-parser#453
Fixes: #24692
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes