diff options
Diffstat (limited to 'ext/node')
-rw-r--r-- | ext/node/polyfills/_tls_wrap.ts | 5 | ||||
-rw-r--r-- | ext/node/polyfills/http2.ts | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/ext/node/polyfills/_tls_wrap.ts b/ext/node/polyfills/_tls_wrap.ts index 315cbf74a..a70dd29f1 100644 --- a/ext/node/polyfills/_tls_wrap.ts +++ b/ext/node/polyfills/_tls_wrap.ts @@ -68,7 +68,7 @@ export class TLSSocket extends net.Socket { secureConnecting: boolean; _SNICallback: any; servername: string | null; - alpnProtocol: any; + alpnProtocols: string[] | null; authorized: boolean; authorizationError: any; [kRes]: any; @@ -96,6 +96,7 @@ export class TLSSocket extends net.Socket { caCerts = [new TextDecoder().decode(caCerts)]; } tlsOptions.caCerts = caCerts; + tlsOptions.alpnProtocols = ["h2", "http/1.1"]; super({ handle: _wrapHandle(tlsOptions, socket), @@ -113,7 +114,7 @@ export class TLSSocket extends net.Socket { this.secureConnecting = true; this._SNICallback = null; this.servername = null; - this.alpnProtocol = null; + this.alpnProtocols = tlsOptions.alpnProtocols; this.authorized = false; this.authorizationError = null; this[kRes] = null; diff --git a/ext/node/polyfills/http2.ts b/ext/node/polyfills/http2.ts index a13953e76..d86148e4e 100644 --- a/ext/node/polyfills/http2.ts +++ b/ext/node/polyfills/http2.ts @@ -210,11 +210,12 @@ export class Http2Session extends EventEmitter { } goaway( - _code: number, - _lastStreamID: number, - _opaqueData: Buffer | TypedArray | DataView, + code?: number, + lastStreamID?: number, + opaqueData?: Buffer | TypedArray | DataView, ) { - warnNotImplemented("Http2Session.goaway"); + // TODO(satyarohith): create goaway op and pass the args + debugHttp2(">>> goaway - ignored args", code, lastStreamID, opaqueData); if (this[kDenoConnRid]) { core.tryClose(this[kDenoConnRid]); } |