From da709729e3dd6f310182581ca1c6380ad51443fc Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Fri, 21 Jul 2023 02:18:07 +0200 Subject: fix(node/http): add encrypted field to FakeSocket (#19886) Fixes #19557 --- ext/node/polyfills/https.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/node/polyfills/https.ts') diff --git a/ext/node/polyfills/https.ts b/ext/node/polyfills/https.ts index c504f0874..46d4bd087 100644 --- a/ext/node/polyfills/https.ts +++ b/ext/node/polyfills/https.ts @@ -50,6 +50,8 @@ export class Server extends HttpServer { : this._opts.key, }; } + + _encrypted = true; } export function createServer(opts, requestListener?: ServerHandler) { return new Server(opts, requestListener); @@ -110,6 +112,7 @@ const globalAgent = new Agent({ /** HttpsClientRequest class loosely follows http.ClientRequest class API. */ class HttpsClientRequest extends ClientRequest { + override _encrypted: true; override defaultProtocol = "https:"; override _getClient(): Deno.HttpClient | undefined { if (caCerts === null) { -- cgit v1.2.3