diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-04-27 00:58:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 00:58:18 +0200 |
commit | e2761df3fe2a457948948dcd38fb4f7e02cd350e (patch) | |
tree | 2924535980a53ff044b7ba9f6fc40522c1554679 /ext/http/01_http.js | |
parent | a8b4e346b4477e340f36a59f83a0974afd541f4b (diff) |
fix(ext/http): internal upgradeHttpRaw works with "Deno.serve()" API (#18859)
Fix internal "upgradeHttpRaw" API restoring capability to upgrade HTTP
connection in polyfilles "node:http" API.
Diffstat (limited to 'ext/http/01_http.js')
-rw-r--r-- | ext/http/01_http.js | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/ext/http/01_http.js b/ext/http/01_http.js index 95e2cee74..0048eedeb 100644 --- a/ext/http/01_http.js +++ b/ext/http/01_http.js @@ -64,7 +64,6 @@ const { } = primordials; const connErrorSymbol = Symbol("connError"); -const streamRid = Symbol("streamRid"); const _deferred = Symbol("upgradeHttpDeferred"); class HttpConn { @@ -482,16 +481,6 @@ function upgradeHttp(req) { return req[_deferred].promise; } -async function upgradeHttpRaw(req, tcpConn) { - const inner = toInnerRequest(req); - if (inner._wantsUpgrade) { - return inner._wantsUpgrade("upgradeHttpRaw", arguments); - } - - const res = await core.opAsync("op_http_upgrade_early", inner[streamRid]); - return new TcpConn(res, tcpConn.remoteAddr, tcpConn.localAddr); -} - const spaceCharCode = StringPrototypeCharCodeAt(" ", 0); const tabCharCode = StringPrototypeCharCodeAt("\t", 0); const commaCharCode = StringPrototypeCharCodeAt(",", 0); @@ -566,4 +555,4 @@ function buildCaseInsensitiveCommaValueFinder(checkText) { internals.buildCaseInsensitiveCommaValueFinder = buildCaseInsensitiveCommaValueFinder; -export { _ws, HttpConn, serve, upgradeHttp, upgradeHttpRaw, upgradeWebSocket }; +export { _ws, HttpConn, serve, upgradeHttp, upgradeWebSocket }; |