-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add proxy handler "has" for "http2.Http2ServerResponse.socket" and "http2.Http2ServerRequest.socket" #35197
Conversation
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a unit test?
Ok, testing is in progress |
@codebytere @Trott @schamberg97 @addaleax Request review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Can you fix the lint-js errors? it will make the review easier. |
I've fixed all the lint errors in a pair of fixup commits. @rickyes PTAL |
LGTM but I'm going to defer to others on whether this is expected/idiomatic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course this is expected/idiomatic.
@@ -188,6 +188,11 @@ function resumeStream(stream) { | |||
} | |||
|
|||
const proxySocketHandler = { | |||
has(stream, prop) { | |||
const ref = stream.session !== undefined ? stream.session[kSocket] : stream; | |||
return (prop in stream) || (prop in ref); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional suggestion: The test file only covers one of these conditions, right? Does it make sense to add a test case so that both are covered?
PR-URL: #35197 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Landed in 0d2e198 |
PR-URL: #35197 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #35197 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #35197 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #35197 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesadd proxy handler "has" for "http2.Http2ServerResponse.socket" and "http2.Http2ServerRequest.socket".
Usually check whether the connection is a secure connection using the following judgment method: