Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v8.9.2 proposal #17204

Merged
merged 110 commits into from
Dec 5, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
9df1e8f
console: avoid adding infinite error listeners
mcollina Nov 5, 2017
47b1c3b
test: add test for WrapStream readStop
akaila Oct 21, 2017
255fffb
src: do not include x.h if x-inl.h is included
joyeecheung Oct 30, 2017
a2fd9a3
doc: add *-inl.h include rule to C++ style guide
joyeecheung Oct 27, 2017
cecd1e3
src: fix etw provider include on Windows
joyeecheung Oct 31, 2017
981a1ef
test: use ES6 classes instead of util.inherits
tniessen Nov 10, 2017
d27ec13
repl: avoid crashing from null and undefined errors
priyank-p Oct 28, 2017
d2e4a87
doc: howto decode buffers extending from Writable
dicearr Oct 23, 2017
2f66faf
test: use fixtures module in test-https-pfx
t-k-g Oct 6, 2017
79e1d77
src: remove unused includes in string_bytes.h
danbev Oct 30, 2017
4e848d4
build: add missing comma in sources list
danbev Oct 30, 2017
b3032d2
test: increase coverage for ModuleMap
robtpaton Oct 6, 2017
72c34cf
test,net: remove scatological terminology
Trott Oct 30, 2017
82076ed
src: pass context to Get() operations for cares_wrap
evanlucas Oct 31, 2017
13866b8
doc: add windowsVerbatimArguments docs
Oct 18, 2017
542f3b9
doc: add details about rss on process.memoryUsage
profnandaa Oct 27, 2017
1bf6250
doc : mention constant-time in crypto doc
mithunsasidharan Oct 30, 2017
1e8a421
test: pause child until parent is ready
jBarz Oct 4, 2017
a41cc02
test: fix flaky test-http2-server-rst-stream.js
apapirovski Nov 2, 2017
d9a18be
build: suppress lint-md output
gibfahn Oct 27, 2017
2cc05e0
doc: add nodejs/gyp team for GYP related issues
gibfahn Oct 31, 2017
57b377e
src: improve module loader readability
addaleax Oct 26, 2017
c52ac92
test: fix malformed parallel.status line
Trott Nov 3, 2017
7618567
doc: add docs for Zlib#close()
lpinca Oct 29, 2017
8cf8a32
http2: refactor settings handling
jasnell Nov 1, 2017
6583016
http2: improve errors thrown in header validation
joyeecheung Nov 3, 2017
9b8e2a6
http: use arrow fns for lexical `this` in Agent
bengl Oct 25, 2017
3319b20
doc: update license to include node-inspect
MylesBorins Nov 1, 2017
480f14a
test: update test to use fixtures
awegrzyn Nov 6, 2017
7b14917
test: replace `common.fixturesDir` usage
sastan Nov 6, 2017
40fa970
tools: replace string concetation with templates
Nov 6, 2017
1e6845d
test: replace common.fixturesDir with fixtures.readSync()
AdriVanHoudt Nov 6, 2017
0fa659c
test: replace common.fixturesDir with fixtures module
doomhz Nov 6, 2017
aaf7e83
tools: replace string concatenation with template literals
lambrojos Nov 6, 2017
af13678
test: clarified assert message for test-require-json.js
matthias-reis Nov 6, 2017
c4176eb
test: replace fixturesDir with usage of fixtures module
itavy Nov 6, 2017
60c918a
tools: replace string concatenation with template literals
kevinwcyu Nov 6, 2017
b166b6b
test: fix typos in read-buffer tests
jimivdw Nov 6, 2017
cb08f5d
tools: remove unneeded parentheses in doc/html.js
vsemozhetbyt Nov 6, 2017
5719bea
test: update test to use fixtures.readKey
Nov 6, 2017
b307582
test: use fixtures module in test-repl
DamianLion Nov 6, 2017
33f2fff
test: refactor tls test to use fixtres.readSync
brianoconnell Nov 6, 2017
f2a9c02
doc: fix json generator warnings
lpinca Nov 4, 2017
2bbc76e
test: include file mode in assert message
sastan Nov 6, 2017
0ebded4
test: show incorrect value on test failure
Nov 6, 2017
562d8fc
test: remove custom message from assertion
Marsup Nov 6, 2017
ec4c3f5
test: improve message in test-fs-readfile-pipe-large
keldorus Nov 6, 2017
fab5598
doc: add isTTY property documentation
sonaysevik Nov 6, 2017
ca27880
test: use default assertion message
jonask-wix Nov 6, 2017
eafc0a1
doc: fix a link in dgram.md
vsemozhetbyt Nov 7, 2017
71c11d6
test: improve assert messages in test-global
markmcnelis Nov 6, 2017
4fcb03c
test: move test-http-keepalive-maxsockets to sequential
Trott Nov 5, 2017
d64fe48
test: check session timeout in http2
apapirovski Nov 4, 2017
2f1f7e1
test: remove message argument in cluster setup test
mbornath Nov 6, 2017
8d31294
src: CHECK() for argument overflow in Spawn()
cjihrig Nov 4, 2017
c4634bf
doc: update subprocess.killed
cjihrig Nov 4, 2017
360f403
doc: fix typo in assert.md
mjomble Nov 7, 2017
c1309d6
test: use tmpDir in test-fs-utimes
Trott Nov 5, 2017
79006da
tools: don't lint files that have not changed
joyeecheung Oct 29, 2017
e66a7ae
test: replace common.fixtiresDir with fixtures.readKey()
wsierakowski Nov 6, 2017
1b1bd26
test: add values to error message
intercity-technology Nov 6, 2017
8538354
tools: add direct anchors for error codes
joyeecheung Nov 5, 2017
7c9aee3
test: improve assertion in test-require-dot
awegrzyn Nov 6, 2017
0bc16cd
test: improve assert messages in stream test
katie-roberts Nov 8, 2017
585f869
build: include src\tracing when linting on win
danbev Nov 3, 2017
d721c0b
doc: improve documentation for the vm module
fhinkel Nov 7, 2017
1522562
test: pass process.env to child processes
rvagg Oct 23, 2017
adb8f08
doc: fix a typo in the documentation
mamatha-jv Nov 10, 2017
7ba0375
deps: cherry-pick cc55747 from V8 upstream
fhinkel Nov 8, 2017
6c57399
test: improve assertion messages
Nov 8, 2017
26d529e
test: cover vm.runInNewContext()
cjihrig Nov 9, 2017
0d4f62c
tools,build: allow build without `remark-cli`
refack Nov 8, 2017
f7411b5
src: make StreamBase prototype accessors robust
joyeecheung Nov 7, 2017
0b8a400
doc: correct the spelling of omitting in dgram.md
vidyasubramanyam Nov 10, 2017
be920aa
test: replace string concatenation with template
tanvikini Nov 10, 2017
41f905b
test: replace string concatenation with template
Nov 10, 2017
81a6c4f
test: enable mustCall() during child exit
vipinmenon Nov 10, 2017
ae7106c
test: replace string concatenation with template
imkabir Nov 10, 2017
134c2f3
lib: replace string concatenation with template
subbachari Nov 10, 2017
7164d9a
test: use template string for concatenation
vipinmenon Nov 10, 2017
febd1bf
test: change string concatenation to template
narkedi Nov 10, 2017
6eb550d
doc: remove duplicate 'the' from http2 API doc
vipinmenon Nov 10, 2017
28f0360
lib: change concatenated string to template
Nayanadask Nov 10, 2017
7168a7e
test: change concatenated string to template
Anaweshak Nov 10, 2017
6e7a444
doc: outline commit message for breaking changes
MatonAnthony Nov 6, 2017
bf9eb04
test: change concatenated string to template
deesebas Nov 10, 2017
2ad051d
lib: change concatenated string to template
pajangid Nov 10, 2017
8f0793f
doc: clarify the prerequisites for building with VS2017
seishun Nov 9, 2017
4088089
src: use unrefed async for GC tracking
addaleax Nov 4, 2017
c3e6491
test: unmark flaky test
addaleax Nov 4, 2017
3a3792b
test: improve template value for test message
d1b1 Nov 6, 2017
af8b17a
test: use common/fixtures module in hash-seed test
Nov 6, 2017
dc14c25
loader: test search module
clakech Nov 6, 2017
29efb02
http2: multiple smaller code cleanups
jasnell Nov 4, 2017
ccd3646
doc: reorganize COLLABORATOR_GUIDE.md
Trott Oct 1, 2017
4f587e5
test: add a test description
grantgasp Nov 6, 2017
5c8fb6a
test: refactor fs.write() test
Nov 6, 2017
85fd7bb
tools: fix inspector-check reporting
danbev Oct 23, 2017
14f8cee
lib: guard inspector console using process var
danbev Sep 25, 2017
4faf2ec
lib: replace string concatenation with template
narkedi Nov 10, 2017
315fba8
test: used fixturesDir from fixtures modules
Nov 6, 2017
891ddad
doc: fix typo in http2 doc
devsnek Nov 13, 2017
c3c9a8d
doc: recommend node-core-utils for metadata
Trott Nov 13, 2017
57937e5
tools: remove unused trailing function arguments
Trott Nov 9, 2017
2b903bf
tools: enforce no unused trailing arguments tools directory
Trott Nov 9, 2017
6ab706d
test: refactor comments in test-child-process-spawnsync-maxbuf
chrbergert Nov 6, 2017
375bec0
test: use fixtures module for path resolve
sercanyersen Nov 6, 2017
efdd7c8
test: reuse existing PassThrough implementation
tniessen Nov 10, 2017
dcb2644
2017-12-05, Version 8.9.2 'Carbon' (LTS)
gibfahn Nov 21, 2017
cf9b557
Working on v8.9.3
gibfahn Dec 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
http2: improve errors thrown in header validation
PR-URL: #16718
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
joyeecheung authored and gibfahn committed Nov 14, 2017
commit 658301664f746a598cac6a48a8d72e7e42d1848a
2 changes: 1 addition & 1 deletion doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ requests and responses.
<a id="ERR_HTTP2_INVALID_HEADER_VALUE"></a>
### ERR_HTTP2_INVALID_HEADER_VALUE

Used to indicate that an invalid HTTP/2 header value has been specified.
Used to indicate that an invalid HTTP2 header value has been specified.

<a id="ERR_HTTP2_INVALID_INFO_STATUS"></a>
### ERR_HTTP2_INVALID_INFO_STATUS
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ E('ERR_HTTP2_INFO_STATUS_NOT_ALLOWED',
'Informational status codes cannot be used');
E('ERR_HTTP2_INVALID_CONNECTION_HEADERS',
'HTTP/1 Connection specific headers are forbidden: "%s"');
E('ERR_HTTP2_INVALID_HEADER_VALUE', 'Value must not be undefined or null');
E('ERR_HTTP2_INVALID_HEADER_VALUE', 'Invalid value "%s" for header "%s"');
E('ERR_HTTP2_INVALID_INFO_STATUS',
(code) => `Invalid informational status code: ${code}`);
E('ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH',
Expand Down
18 changes: 12 additions & 6 deletions lib/internal/http2/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ let statusMessageWarned = false;
// close as possible to the current require('http') API

function assertValidHeader(name, value) {
if (name === '' || typeof name !== 'string')
throw new errors.TypeError('ERR_INVALID_HTTP_TOKEN', 'Header name', name);
if (isPseudoHeader(name))
throw new errors.Error('ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED');
if (value === undefined || value === null)
throw new errors.TypeError('ERR_HTTP2_INVALID_HEADER_VALUE');
let err;
if (name === '' || typeof name !== 'string') {
err = new errors.TypeError('ERR_INVALID_HTTP_TOKEN', 'Header name', name);
} else if (isPseudoHeader(name)) {
err = new errors.Error('ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED');
} else if (value === undefined || value === null) {
err = new errors.TypeError('ERR_HTTP2_INVALID_HEADER_VALUE', value, name);
}
if (err !== undefined) {
Error.captureStackTrace(err, assertValidHeader);
throw err;
}
}

function isPseudoHeader(name) {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http2-compat-serverresponse-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ server.listen(0, common.mustCall(function() {
}, common.expectsError({
code: 'ERR_HTTP2_INVALID_HEADER_VALUE',
type: TypeError,
message: 'Value must not be undefined or null'
message: 'Invalid value "null" for header "foo-bar"'
}));
assert.throws(function() {
response.setHeader(real, undefined);
}, common.expectsError({
code: 'ERR_HTTP2_INVALID_HEADER_VALUE',
type: TypeError,
message: 'Value must not be undefined or null'
message: 'Invalid value "undefined" for header "foo-bar"'
}));
common.expectsError(
() => response.setHeader(), // header name undefined
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http2-compat-serverresponse-trailers.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ server.listen(0, common.mustCall(() => {
{
code: 'ERR_HTTP2_INVALID_HEADER_VALUE',
type: TypeError,
message: 'Value must not be undefined or null'
message: 'Invalid value "undefined" for header "test"'
}
);
common.expectsError(
() => response.setTrailer('test', null),
{
code: 'ERR_HTTP2_INVALID_HEADER_VALUE',
type: TypeError,
message: 'Value must not be undefined or null'
message: 'Invalid value "null" for header "test"'
}
);
common.expectsError(
Expand Down