-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always pass NODE_OPTIONS with max-http-header-size (#5452)
* cli: set NODE_OPTIONS=--max-http-header-size=1024*1024 on spawn * electron: remove redundant max-http-header-size * server: add useCli option to make e2e tests go thru cli * server: add test for XHR with body > 100kb via CLI * clean up conditional * cli: don't pass --max-http-header-size in dev w node < 11.10 * add original_node_options to restore o.g. user node_options * force no color
- Loading branch information
Showing
9 changed files
with
117 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
exports['lib/exec/spawn .start detects kill signal exits with error on SIGKILL 1'] = ` | ||
The Test Runner unexpectedly exited via a [36mexit[39m event with signal [36mSIGKILL[39m | ||
exports['lib/exec/spawn .start forces colors and streams when supported 1'] = { | ||
"FORCE_COLOR": "1", | ||
"DEBUG_COLORS": "1", | ||
"MOCHA_COLORS": "1", | ||
"FORCE_STDIN_TTY": "1", | ||
"FORCE_STDOUT_TTY": "1", | ||
"FORCE_STDERR_TTY": "1", | ||
"NODE_OPTIONS": "--max-http-header-size=1048576" | ||
} | ||
|
||
Please search Cypress documentation for possible solutions: | ||
[34mhttps://on.cypress.io[39m | ||
Check if there is a GitHub issue describing this crash: | ||
[34mhttps://github.com/cypress-io/cypress/issues[39m | ||
Consider opening a new issue. | ||
---------- | ||
Platform: darwin (Foo-OsVersion) | ||
Cypress Version: 0.0.0 | ||
` | ||
exports['lib/exec/spawn .start does not force colors and streams when not supported 1'] = { | ||
"FORCE_COLOR": "0", | ||
"DEBUG_COLORS": "0", | ||
"FORCE_STDIN_TTY": "0", | ||
"FORCE_STDOUT_TTY": "0", | ||
"FORCE_STDERR_TTY": "0", | ||
"NODE_OPTIONS": "--max-http-header-size=1048576" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Once the Electron process is launched, restore the user's original NODE_OPTIONS | ||
* environment variables from before the CLI added extra NODE_OPTIONS. | ||
* | ||
* This way, any `node` processes launched by Cypress will retain the user's | ||
* `NODE_OPTIONS` without unexpected modificiations that could cause issues with | ||
* user code. | ||
*/ | ||
|
||
export function reset () { | ||
// @ts-ignore | ||
if (process.versions.electron && typeof process.env.ORIGINAL_NODE_OPTIONS === 'string') { | ||
process.env.NODE_OPTIONS = process.env.ORIGINAL_NODE_OPTIONS | ||
|
||
delete process.env.ORIGINAL_NODE_OPTIONS | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,5 @@ describe "e2e xhr", -> | |
spec: "xhr_spec.coffee" | ||
snapshot: true | ||
expectedExitCode: 0 | ||
useCli: true | ||
} |