http2: handle existing socket data when creating HTTP/2 server sessions#41185
Merged
nodejs-github-bot merged 1 commit intonodejs:masterfrom Dec 23, 2021
Merged
Conversation
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.
Collaborator
|
Review requested:
|
Member
Author
|
The |
Collaborator
Member
FYI npm had an outage earlier today: https://status.npmjs.org/incidents/7klw65jd5f5r |
20 tasks
addaleax
approved these changes
Dec 16, 2021
Collaborator
This was referenced Dec 17, 2021
Collaborator
22 tasks
Collaborator
Collaborator
This was referenced Dec 22, 2021
Collaborator
Collaborator
|
Landed in cadeabc |
This was referenced Dec 24, 2021
targos
pushed a commit
that referenced
this pull request
Jan 14, 2022
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Jan 31, 2022
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Linkgoron
pushed a commit
to Linkgoron/node
that referenced
this pull request
Jan 31, 2022
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: nodejs#41185 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Feb 1, 2022
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #34532 (maybe #29902 too, TBC)
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.There was an attempt to fix this previously in #34958, which works! Unfortunately that was closed and replaced by #35678, which fixes the same issue but only for outgoing connections (by fixing
http2.connectdirectly), not all HTTP/2 sessions.This PR takes the HTTP/2 test from #34958 (which covers the server case) and moves the fix from #35678 into the session so it applies to all HTTP/2 sessions.