https: handle invalid TLS options in proxied requests · nodejs/node@33e4ba3 · GitHub
Skip to content

Commit 33e4ba3

Browse files
christianaurichzmaduh95
authored andcommitted
https: handle invalid TLS options in proxied requests
tls.connect() can throw while validating TLS options. For proxied HTTPS requests, it is called after the CONNECT response has been received, so the throw happens asynchronously from the original https.request() call and ends the process as an uncaught exception. Catch the error, close the tunnel socket, and propagate it to the request. Signed-off-by: Christian Aurich <christian.aurichzm@gmail.com> PR-URL: #66096 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
1 parent 70c269a commit 33e4ba3

2 files changed

Lines changed: 89 additions & 5 deletions

File tree

‎lib/https.js‎

Lines changed: 14 additions & 5 deletions
Lines changed: 75 additions & 0 deletions

0 commit comments

Comments
 (0)