Closed
Description
- Version: v14.3.0
- Platform: Mac OS X
- Subsystem: http2
What steps will reproduce the bug?
Http2Stream.end('data');
How often does it reproduce? Is there a required condition?
It occurs as long as there are no trailers (which means always on ClientHttp2Stream
)
What is the expected behavior?
The DATA
frame with the last piece of data should have the END_STREAM
flag.
What do you see instead?
Lines 2319 to 2326 in f46ca0f
The NGHTTP2_DATA_FLAG_EOF
is only set if the outbound stream is no long writable (eg: on shutdown), but not if the internal (Writable
) stream has ended.
Additional information
This is how curl
, Chrome, and Safari send DATA frames, wherein the last DATA frame contains the END_STREAM
flag, instead of sending an empty frame. It makes it more difficult to test http2 if nodeJS applies different logic. Performance-wise, it's a wasted packet.