fix(ext/node): set socket.authorized to true for https request (#30641)

This PR sets true to `req.socket.authorized` when making https request
from `node:https` module.

This makes yarn classic's https client working (e.g. `yarn add cowsay`).

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Yoshiya Hinosawa 2025-09-09 05:29:41 +09:00 committed by GitHub
parent 928f26db78
commit 6ee7d60ce1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 1 deletions

View file

@ -538,6 +538,10 @@ class ClientRequest extends OutgoingMessage {
caCerts: caCerts,
alpnProtocols: ["http/1.0", "http/1.1"],
}, keyPair);
// Simulates "secure" event on TLSSocket
// This makes yarn v1's https client working
this.socket.authorized = true;
}
this._req = await op_node_http_request_with_conn(