diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-04-18 09:37:47 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 09:37:47 -0600 |
commit | 5e2a747685490b31efa778241fccf938bd33722d (patch) | |
tree | 6ede300e32bf57942ba0bf4ddae8d4eb02026e5a /tests/unit_node/net_test.ts | |
parent | 25a80bc523bf47d5eba8d578b9ffeba26a8d0341 (diff) |
fix(ext/node): Correctly send ALPN on node TLS connections (#23434)
Landing work from #21903, plus fixing a node compat bug.
We were always sending the HTTP/2 ALPN on TLS connections which might
confuse upstream servers.
Changes:
- Configure HTTP/2 ALPN when making the TLS connection from the HTTP/2
code
- Read the `ALPNProtocols` property from the TLS connection options
rather than the deno `alpnProtocols` field
- Add tests
Prereq for landing Deno.serveHttp on Deno.serve: removing older HTTP
servers from the codebase.
Diffstat (limited to 'tests/unit_node/net_test.ts')
-rw-r--r-- | tests/unit_node/net_test.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unit_node/net_test.ts b/tests/unit_node/net_test.ts index eac4633cb..e08b24c02 100644 --- a/tests/unit_node/net_test.ts +++ b/tests/unit_node/net_test.ts @@ -55,6 +55,7 @@ Deno.test("[node/net] net.connect().unref() works", async () => { const ctl = new AbortController(); const server = Deno.serve({ signal: ctl.signal, + port: 0, // any available port will do handler: () => new Response("hello"), onListen: async ({ port, hostname }) => { const { stdout, stderr } = await new Deno.Command(Deno.execPath(), { |