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 /cli/bench | |
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 'cli/bench')
-rw-r--r-- | cli/bench/testdata/deno_upgrade_http.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/cli/bench/testdata/deno_upgrade_http.js b/cli/bench/testdata/deno_upgrade_http.js deleted file mode 100644 index a959846ce..000000000 --- a/cli/bench/testdata/deno_upgrade_http.js +++ /dev/null @@ -1,12 +0,0 @@ -const { serve, upgradeHttpRaw } = Deno; -const u8 = Deno[Deno.internal].core.encode( - "HTTP/1.1 101 Switching Protocols\r\n\r\n", -); - -async function handler(req) { - const [conn, _firstPacket] = upgradeHttpRaw(req); - await conn.write(u8); - await conn.close(); -} - -serve({ hostname: "127.0.0.1", port: 9000 }, handler); |