Skip to content

Commit 4ffa0b4

Browse files
rawkakaniRawk Akani
authored andcommitted
fix(ext/node): remove kUseNativeWrap on TLS TCP handles to fix HTTPS regression
The native wrap path introduced in #33184 sets `kUseNativeWrap = true` on freshly created TCP handles in `TLSSocket._wrapHandle`. This forces the handle into `#nativeConnect` which never populates `kStreamBaseField`. When `http.ts:_writeHeader` later reads `handle[kStreamBaseField][internalRidSymbol]` to obtain the connection rid for `op_node_http_request_with_conn`, it crashes: TypeError: Cannot read properties of undefined (reading 'Symbol(Deno.internal.rid)') This breaks all HTTPS client requests via Node compat (Playwright, @deno/sandbox, any npm package using https.request). Regression bisected: - 2.7.11: works - 2.7.12: broken Fix: remove the `kUseNativeWrap = true` assignment so freshly created TCP handles use the legacy connect path that populates `kStreamBaseField` with a `TcpConn` carrying a valid rid. Fixes #33231 Fixes #33229
1 parent e99152e commit 4ffa0b4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

ext/node/polyfills/_tls_wrap.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ TLSSocket.prototype._wrapHandle = function (wrap, handle) {
315315
handle = options.pipe
316316
? new Pipe(PipeConstants.SOCKET)
317317
: new TCP(TCPConstants.SOCKET);
318-
handle[kUseNativeWrap] = true;
319318
}
320319

321320
// Wrap socket's handle with TLSWrap

0 commit comments

Comments
 (0)