http2: handle existing socket data when creating HTTP/2 server sessions · nodejs/node@3c99a4d · GitHub
Skip to content

Commit 3c99a4d

Browse files
pimterrydanielleadams
authored andcommitted
http2: handle existing socket data when creating HTTP/2 server sessions
When emitting a 'connection' event to manually inject connections into a server, it's common for the provided stream to already contain readable data, e.g. after sniffing a connection to detect HTTP/2 from the initial bytes. Previously this was supported only for outgoing HTTP/2 sessions created with http2.connect(). This change ensures that HTTP/2 over existing streams is supported on both outgoing and incoming sessions. PR-URL: #41185 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent f3b0dfc commit 3c99a4d

2 files changed

Lines changed: 87 additions & 15 deletions

File tree

lib/internal/http2/core.js

Lines changed: 15 additions & 15 deletions
Lines changed: 72 additions & 0 deletions

0 commit comments

Comments
 (0)