Files
scriptc/packages/runtime/src
Chris Tate b18a28bdef Parse IPv4 hosts in special-scheme URLs like WHATWG URL
The URL host parser kept a host whose last label is a number as a
domain, so new URL("http://127.1").hostname was "127.1" where Node
answers 127.0.0.1, and hosts such as 1.2.3.256, 0x100000000 and
1.2.3.4.5 parsed where Node throws Invalid URL.

A special-scheme host (file: included) that ends in a number now goes
through the WHATWG IPv4 parser: up to four labels after one trailing
empty label, each a decimal, 0x hexadecimal or leading-zero octal
number, every label but the last at most 255 and the last below
256^(5 - labels). The address serializes as dotted decimal, and any
failure makes the URL invalid. The constructor, URL.parse, URL.canParse,
the host and hostname setters and domainToASCII/domainToUnicode share
the parser. Non-special schemes keep their opaque host as written.
Corpus 5860 covers each form.
2026-10-16 20:27:21 -05:00
..
2026-10-14 08:46:13 -05:00
2026-10-14 21:17:46 -05:00
2026-10-16 04:30:20 -05:00
2026-10-16 10:33:14 -05:00
2026-10-16 10:33:14 -05:00
2026-10-15 04:02:33 -05:00
2026-10-16 07:54:59 -05:00
2026-10-15 21:07:04 -05:00
2026-10-07 19:07:02 -05:00
2026-10-13 19:48:11 -05:00
2026-10-14 17:27:02 -05:00
2026-10-15 23:58:50 -05:00
2026-10-13 19:48:11 -05:00
2026-10-14 17:27:02 -05:00