From 9bdb95c9e34cef640534e5e5a1e2225a80442000 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:48:15 +0800
Subject: [PATCH] TODO#139894 [ footer -最下方說明與保經代合作 ] 文案修改

---
 PAMapp/node_modules/https-proxy-agent/dist/agent.js |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/PAMapp/node_modules/https-proxy-agent/dist/agent.js b/PAMapp/node_modules/https-proxy-agent/dist/agent.js
index d666525..75d1136 100644
--- a/PAMapp/node_modules/https-proxy-agent/dist/agent.js
+++ b/PAMapp/node_modules/https-proxy-agent/dist/agent.js
@@ -118,13 +118,10 @@
             if (statusCode === 200) {
                 req.once('socket', resume);
                 if (opts.secureEndpoint) {
-                    const servername = opts.servername || opts.host;
-                    if (!servername) {
-                        throw new Error('Could not determine "servername"');
-                    }
                     // The proxy is connecting to a TLS server, so upgrade
                     // this socket connection to a TLS connection.
                     debug('Upgrading socket connection to TLS');
+                    const servername = opts.servername || opts.host;
                     return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
                         servername }));
                 }
@@ -141,7 +138,7 @@
             //
             // See: https://hackerone.com/reports/541502
             socket.destroy();
-            const fakeSocket = new net_1.default.Socket();
+            const fakeSocket = new net_1.default.Socket({ writable: false });
             fakeSocket.readable = true;
             // Need to wait for the "socket" event to re-play the "data" events.
             req.once('socket', (s) => {

--
Gitblit v1.8.0