rgrempel / elm-route-url

Router for single-page-apps in Elm
http://package.elm-lang.org/packages/rgrempel/elm-route-url/latest
MIT License
196 stars 16 forks source link

Weird address bar behavior when hostname is not a full url but internal servername #30

Closed MarkNijhof closed 6 years ago

MarkNijhof commented 7 years ago

Hi,

We are using your router for a project that uses a server hostname vs a "domain name" and when doing so the address bar starts adding the servername to the url. http://bgowebvrs01/

address

The first is not loaded, but when hitting enter it immediately ads the hostname, and then after every navigation it ads a new one. The routing works btw I see the expected content.

When I use a full qualified name like http://bgowebvrs01.verit.kgjs.com/ none of this is happening. Also not when developing locally using http://localhost;3000/

-Mark

MarkNijhof commented 7 years ago

Btw this is in Chrome and IE and I am using 3.0.1 of the route-url library

robashton commented 7 years ago

@MarkNijhof This isn't to do with this library, but instead sporto/erl which is a dependency of this.

The parsing of earlier versions of the library (10 in this case) is absolutely nonsensical, and has been patched in future versions to be (still absolutely nonsensical) slightly more correct.

The version of sporto/erl in elm-route-url needs updating, I gave it a crack this morning with @philipstears but because the Builder uses a Dict String String and newer versions of sporto/erl use a List String String it involves a breaking change across the library and is a PITA to implement as a casual outsider.

@rgrempel Something to be done here?

rgrempel commented 6 years ago

Sorry not to get to this sooner. I'm now working on #31 to update the sporto/erl dependency ... hopefully that will take care of it.

rgrempel commented 6 years ago

I've now published version 4, which will use more recent versions of sporto/erl. Let me know if that helps with this issue!