Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 82af8ac

Browse filesBrowse files
mildsunriseMylesBorins
authored andcommitted
http2,doc: minor fixes
Some small fixes on HTTP/2 and its documentation: - Add a note that, on server streams, it's not necessary to start data flow. - Set EOF flag if we have marked all data for sending: there's no need to wait until the queue is actually empty (and send a separate, empty DATA). (Note that, even with this change, a separate DATA frame will always be sent, because the streams layer waits until data has been flushed before dispatching EOF) Backport-PR-URL: #34845 PR-URL: #28044 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent e85ca7a commit 82af8ac
Copy full SHA for 82af8ac

File tree

Expand file treeCollapse file tree

2 files changed

+4
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/http2.md‎

Copy file name to clipboardExpand all lines: doc/api/http2.md
+3-2Lines changed: 3 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,9 @@ the value is `undefined`, the stream is not yet ready for use.
927927
All [`Http2Stream`][] instances are destroyed either when:
928928

929929
* An `RST_STREAM` frame for the stream is received by the connected peer,
930-
and pending data has been read.
931-
* The `http2stream.close()` method is called, and pending data has been read.
930+
and (for client streams only) pending data has been read.
931+
* The `http2stream.close()` method is called, and (for client streams only)
932+
pending data has been read.
932933
* The `http2stream.destroy()` or `http2session.destroy()` methods are called.
933934

934935
When an `Http2Stream` instance is destroyed, an attempt will be made to send an
Collapse file

‎src/node_http2.cc‎

Copy file name to clipboardExpand all lines: src/node_http2.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,7 @@ ssize_t Http2Stream::Provider::Stream::OnRead(nghttp2_session* handle,
23672367
return NGHTTP2_ERR_DEFERRED;
23682368
}
23692369

2370-
if (stream->queue_.empty() && !stream->IsWritable()) {
2370+
if (stream->available_outbound_length_ == 0 && !stream->IsWritable()) {
23712371
Debug(session, "no more data for stream %d", id);
23722372
*flags |= NGHTTP2_DATA_FLAG_EOF;
23732373
if (stream->HasTrailers()) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.