From 2de17ead8979c6f55a25fdd0725f9952ae031d15 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 13 Sep 2018 09:31:48 -0700 Subject: [PATCH] http2: add http2stream.endAfterHeaders property Indicates is the END_STREAM flag was set on the received HEADERS frame Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/22843 Fixes: https://github.com/nodejs/node/issues/22497 Reviewed-By: Matteo Collina Reviewed-By: Anna Henningsen Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig --- doc/api/http2.md | 11 +++++ lib/internal/http2/core.js | 9 +++- test/parallel/test-http2-endafterheaders.js | 50 +++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-http2-endafterheaders.js diff --git a/doc/api/http2.md b/doc/api/http2.md index 81d1c8fa8e08e7..26ab8a461e07e1 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -952,6 +952,17 @@ added: v8.4.0 Set to `true` if the `Http2Stream` instance has been destroyed and is no longer usable. +#### http2stream.endAfterHeaders + + +* {boolean} + +Set the `true` if the `END_STREAM` flag was set in the request or response +HEADERS frame received, indicating that no additional data should be received +and the readable side of the `Http2Stream` will be closed. + #### http2stream.pending