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

add proxy handler "has" for "http2.Http2ServerResponse.socket" and "http2.Http2ServerRequest.socket" #35197

Closed
wants to merge 17 commits into from
Closed
9 changes: 9 additions & 0 deletions lib/internal/http2/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ function resumeStream(stream) {
}

const proxySocketHandler = {
has(stream, prop){

const ref = stream.session !== undefined ?
stream.session[kSocket] : stream;

return Reflect.has(stream, prop)||Reflect.has(ref, prop)


},
get(stream, prop) {
switch (prop) {
case 'on':
Expand Down