Properly handle scheme-less host:port URLs in the location bar
Right now, localhost:6060 is interpreted as a URL with the scheme localhost, where it should be prefixed with http://. Unfortunately, doing this properly is far from trivial, just as the URL syntax. One thing we could probably get away with for now is to only identify a fixed set of schemes that we handle the current way: data:, javascript:, about: perhaps. blob: for example wouldn't be required because there's no way to navigate to a blob from outside a document anyway.
I'd like to start working on this, assuming no one else is.
What's the long-term plan for Servo handling external protocols like mailto: and webcal:?
What's the long-term plan for Servo handling external protocols like mailto: and webcal:?
There's no fixed plan yet, but it's very likely that Servo will just provide support for registering protocol handlers in its embedding API and leave the rest up to the embedding.
Okay, at that point the URL handling code will need to be integrated with other parts of the system, instead of relying on something like a simple regex. I'm not sure where to look in the Servo codebase to see which protocols it currently handles, so if you know then I'd be happy to take a look. In the meantime, does this list seem reasonable?
about:data:file:http:https:javascript:
Only protocol schemas that're used without // need to be special-cased. http:8080 should not be special-cased: AFAIK, http://http is a perfectly valid URL. That leaves about, data, and javascript. Also handling mailto probably makes sense because it's quite frequent. Not sure what we'd do with it right now, though - maybe just ignore it.
http:8080 should not be special-cased
This is one of those cases where real-world behavior deviates from the spec – Firefox and Chrome both interpret URLs like http:8080 and file:/etc/hosts as if they had the usual //, so should Servo be stricter than existing browsers here?