-
Notifications
You must be signed in to change notification settings - Fork 26
Support ipv6 addresses in constructor string #113
Copy link
Copy link
Closed
Description
As pointed out in #110 its not possible to do new URLPattern("http://[::1]/"). Even if you properly escape the colons like new URLPattern("http://[\\:\\:1]/") it still throws.
Adding support for this turns out to not be too hard. The URL spec simply ignores colons inside [ ] brackets. We can do the same in URLPattern. Of course, for the hostname pattern to be valid the colon's will still need to be escaped.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels