diff options
author | Anatoli Papirovski <apapirovski@mac.com> | 2018-05-17 23:03:15 +0400 |
---|---|---|
committer | Anatoli Papirovski <apapirovski@mac.com> | 2018-05-22 11:42:33 +0400 |
commit | b11e19e8eed059ddf473657c28c357987ca0015e (patch) | |
tree | 60bdfb764feb1c62ff6326ef1532ef567d5a42d4 /test/parallel/test-http2-server-socket-destroy.js | |
parent | 4f0ab76b6c29da74b29125a3ec83bb06e77c2aad (diff) | |
download | android-node-v8-b11e19e8eed059ddf473657c28c357987ca0015e.tar.gz android-node-v8-b11e19e8eed059ddf473657c28c357987ca0015e.tar.bz2 android-node-v8-b11e19e8eed059ddf473657c28c357987ca0015e.zip |
http2: fix several serious bugs
Currently http2 does not properly submit GOAWAY frames when a session
is being destroyed. It also doesn't properly handle when the other
party severs the connection after sending a GOAWAY frame, even though
it should.
Edge, IE & Safari are currently unable to handle empty TRAILERS
frames despite them being correctly to spec. Instead send an empty
DATA frame with END_STREAM flag in those situations.
Fix and adjust several flaky and/or incorrect tests.
PR-URL: https://github.com/nodejs/node/pull/20772
Fixes: https://github.com/nodejs/node/issues/20705
Fixes: https://github.com/nodejs/node/issues/20750
Fixes: https://github.com/nodejs/node/issues/20850
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-server-socket-destroy.js')
-rw-r--r-- | test/parallel/test-http2-server-socket-destroy.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/parallel/test-http2-server-socket-destroy.js b/test/parallel/test-http2-server-socket-destroy.js index 03afc1957b..99595aeb63 100644 --- a/test/parallel/test-http2-server-socket-destroy.js +++ b/test/parallel/test-http2-server-socket-destroy.js @@ -41,14 +41,20 @@ server.on('listening', common.mustCall(() => { // The client may have an ECONNRESET error here depending on the operating // system, due mainly to differences in the timing of socket closing. Do // not wrap this in a common mustCall. - client.on('error', () => {}); + client.on('error', (err) => { + if (err.code !== 'ECONNRESET') + throw err; + }); client.on('close', common.mustCall()); const req = client.request({ ':method': 'POST' }); // The client may have an ECONNRESET error here depending on the operating // system, due mainly to differences in the timing of socket closing. Do // not wrap this in a common mustCall. - req.on('error', () => {}); + req.on('error', (err) => { + if (err.code !== 'ECONNRESET') + throw err; + }); req.on('aborted', common.mustCall()); req.resume(); |