elm / url

Build and parse URLs. Useful for HTTP and "routing" in single-page apps (SPAs)
https://package.elm-lang.org/packages/elm/url/latest/
BSD 3-Clause "New" or "Revised" License
75 stars 43 forks source link

Parsing URLs with IPv6 host #12

Open aryszka opened 6 years ago

aryszka commented 6 years ago

I tried to use URLs with IPv6 host for a Browser.application and the navigation didn't work. The log message in the console directed me to this page: https://github.com/elm/core/blob/1.0.0/hints/1.md . When tried the same with IPv4 or a domain name, then it worked.

The URLs that I tried:

Is this a bug or just the feature is not supported currently?

4onen commented 5 years ago

Appears to be a bug. Line 167 of url/Url.elm indexes the first : in the host of the URL and, if it detects more than one :, assumes the URL is invalid. Should I write a PR that checks for this IPv6 shape before failing?

jeffrey4l commented 5 years ago

i am using alertmanager in a pure ipv6 environment. and got the same exact issue. if i use a domain name instead of ipv6 address, it works.

AlexanderEkdahl commented 4 years ago

I also ran into this problem. PR: https://github.com/elm/url/pull/35

venkatbvc commented 4 years ago

we are having this issue as well

venkatbvc commented 3 years ago

@evancz Can you please look at the fix provided by @AlexanderEkdahl and if all is fine merge the fix? We have been waiting for this for long time.

sriharshabm commented 3 years ago

We are also facing issue, If changes provided by @AlexanderEkdahl is fine then can it be merged?

sriharshabm commented 3 years ago

Could you please update on this ticket

sriharshabm commented 2 years ago

We are also facing issue, If changes provided by @AlexanderEkdahl is fine then can it be merged?

Could you pls comment on this

SarthakSahu commented 2 years ago

@evancz @MrL1605 Could you please help on this.