summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2018-09-15 10:36:55 -0700
committerAnna Henningsen <anna@addaleax.net>2018-09-22 15:36:59 +0200
commite72c6af6c82629a60af735f4d11f40a4e91e0268 (patch)
treec479937973e11944ee14ffebfb8a9d2f826f8b97 /test
parente758d4ab0adf53f2a4b736433714943bc4b4f06f (diff)
downloadandroid-node-v8-e72c6af6c82629a60af735f4d11f40a4e91e0268.tar.gz
android-node-v8-e72c6af6c82629a60af735f4d11f40a4e91e0268.tar.bz2
android-node-v8-e72c6af6c82629a60af735f4d11f40a4e91e0268.zip
http2: do not falsely emit 'aborted' on push
A push stream should have its writable side closed upon receipt, to avoid emitting the 'aborted' event when the readable side is closed. PR-URL: https://github.com/nodejs/node/pull/22878 Fixes: https://github.com/nodejs/node/issues/22851 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-http2-server-push-stream.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/parallel/test-http2-server-push-stream.js b/test/parallel/test-http2-server-push-stream.js
index 69e7434947..74d41ba4b9 100644
--- a/test/parallel/test-http2-server-push-stream.js
+++ b/test/parallel/test-http2-server-push-stream.js
@@ -54,6 +54,7 @@ server.listen(0, common.mustCall(() => {
assert.strictEqual(headers['content-type'], 'text/html');
assert.strictEqual(headers['x-push-data'], 'pushed by server');
}));
+ stream.on('aborted', common.mustNotCall());
}));
let data = '';