Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http2,tls: account for buffered data before creating socket wraps #34958

Closed
wants to merge 3 commits into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Aug 28, 2020

stream: allow using .push()/.unshift() during once('data')

See #34957 (which this PR is blocked on)

tls: account for buffered data before creating TLSSocket wrap

If there is data stored in the socket, create a JSStreamSocket
wrapper so that no data is lost when passing the socket to the
C++ layer (which is unaware of data buffered in JS land).

Refs: #34532

http2: account for buffered data before creating HTTP2 socket wrap

If there is data stored in the socket, create a JSStreamSocket
wrapper so that no data is lost when passing the socket to the
C++ layer (which is unaware of data buffered in JS land).

Fixes: #34532

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@addaleax addaleax added tls Issues and PRs related to the tls subsystem. blocked PRs that are blocked by other issues or PRs. http2 Issues or PRs related to the http2 subsystem. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 28, 2020
@addaleax addaleax requested review from a team as code owners August 28, 2020 15:16
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label Aug 28, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 28, 2020
@nodejs-github-bot
Copy link
Collaborator

@addaleax addaleax added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 28, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 28, 2020
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with a question

lib/_stream_readable.js Outdated Show resolved Hide resolved
@addaleax addaleax added request-ci Add this label to start a Jenkins CI on a PR. and removed blocked PRs that are blocked by other issues or PRs. labels Aug 30, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 30, 2020
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Aug 30, 2020

If there is data stored in the socket, create a `JSStreamSocket`
wrapper so that no data is lost when passing the socket to the
C++ layer (which is unaware of data buffered in JS land).

Refs: nodejs#34532
If there is data stored in the socket, create a `JSStreamSocket`
wrapper so that no data is lost when passing the socket to the
C++ layer (which is unaware of data buffered in JS land).

Fixes: nodejs#34532
@addaleax addaleax added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 6, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 6, 2020
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still lgtm

@addaleax
Copy link
Member Author

addaleax commented Oct 6, 2020

Yeah, I just rebased to remember why this was failing :)

@addaleax addaleax closed this Oct 16, 2020
@addaleax addaleax deleted the http2-unshift branch October 16, 2020 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem. stream Issues and PRs related to the stream subsystem. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP/2 server does not accept injected 'connection' events for sockets with peeked data
3 participants