Closed mikicho closed 1 month ago
I unified this in one issue because we need to take all of these into account in the solution.
Socket authorized and encrypted are false for https requests
https.get('https://example.test').on('socket', socket => { expect(socket.authorized).to.equal(true) // always false, test fails expect(socket.encrypted).to.equal(true) // always false, test fails done() })
never emit (socket) connect event for an invalid URL (e.g. example.test) because Node tries to connect to the URL, and we capture the ENOTFOUND.
connect
example.test
ENOTFOUND
We can't use socket.setTimeout for invalid URL (e.g. example.test`) because it emits error
socket.setTimeout
I unified this in one issue because we need to take all of these into account in the solution.
Socket authorized and encrypted are false for https requests
never emit (socket)
connect
event for an invalid URL (e.g.example.test
) because Node tries to connect to the URL, and we capture theENOTFOUND
.We can't use
socket.setTimeout
for invalid URL (e.g. example.test`) because it emits error