Skip to content

Comments

fix(ext/node): support ipv6 host in node:http#32258

Open
0f-0b wants to merge 1 commit intodenoland:mainfrom
0f-0b:node-http-ipv6
Open

fix(ext/node): support ipv6 host in node:http#32258
0f-0b wants to merge 1 commit intodenoland:mainfrom
0f-0b:node-http-ipv6

Conversation

@0f-0b
Copy link
Contributor

@0f-0b 0f-0b commented Feb 21, 2026

Closes #21864. Full reproduction of the bug:

import { once } from "node:events";
import { request } from "node:http";

await using _server = Deno.serve({ hostname: "::1" }, () => new Response());
const req = request("http://[::1]:8000").end();
const [res] = await once(req, "response");
console.log(res.statusCode); // should print `200`

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, could you add a unit test @0f-0b?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid URL on IPv6 http.RequestOptions.host without square brackets

2 participants