-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.http2Issues or PRs related to the http2 subsystem.Issues or PRs related to the http2 subsystem.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
Version
v16.4.2
Platform
Linux solus 5.13.1-187.current #1 SMP PREEMPT Wed Jul 7 19:52:26 UTC 2021 x86_64 GNU/Linux
Subsystem
http2
What steps will reproduce the bug?
import http2 from 'http2';
import stream from 'stream';
const session = http2.connect('https://petstore.swagger.io/v2/pet/findByStatus?status=available');
const request = session.request({
':path': '/findByStatus?status=available',
'x-trace-id': 'foo',
'user-agent': 'foo-bar/baz, bash'
});
request.on('data', () => {
request.destroy(new Error('error'));
});
request.on('end', () => {
console.log('end');
});
request.end();
await stream.promises.pipeline(
request,
new stream.PassThrough()
);
console.log('success');
session.close();
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
Error: error
at ClientHttp2Stream.<anonymous> (file:///home/szm/Desktop/got/demo.js:12:18)
at ClientHttp2Stream.emit (node:events:406:35)
at addChunk (node:internal/streams/readable:312:12)
at readableAddChunk (node:internal/streams/readable:287:9)
at ClientHttp2Stream.Readable.push (node:internal/streams/readable:226:10)
at Http2Stream.onStreamRead (node:internal/stream_base_commons:190:23)
What do you see instead?
end
success
Additional information
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.http2Issues or PRs related to the http2 subsystem.Issues or PRs related to the http2 subsystem.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.