Hacker News new | ask | show | jobs
by zeroimpl 2154 days ago
What would :443/thing.jpg mean? Is that a port or hostname?
2 comments

Also, don’t forget user/pass prompt in a URL.
There is no ambiguity.

http:username:password@example.com/thing.jpg http:username:password@example.com:8080@example.com/thing.jpg

But they might have picked a different delimiter for that in this alternative future. Or perhaps realized it was a bad idea earlier.

IPv6 addresses are a different story. We definitely would have chosen a different character to delimit IPv6 addresses in this future.

A port. RFC 1912 states "Labels may not be all numbers, but may have a leading digit (e.g., 3com.com)."
FWIW I had googled whether hostnames may be entirely digits before asking this, and this SO answer suggested yes. Perhaps that doesn’t apply to URLs? But to be clear I meant hostname not a FQDN, because obviously there is no ambiguity once a dot is present.

https://serverfault.com/questions/638260/is-it-valid-for-a-h...