5 ms·
What would :443/thing.jpg mean? Is that a port or hostname?
by zeroimpl 6y ago
What would :443/thing.jpg mean? Is that a port or hostname?
- EADGBE 6y agoAlso, don’t forget user/pass prompt in a URL.
- otterlicious 6y agoThere 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.
- otterlicious 6y agoA port. RFC 1912 states "Labels may not be all numbers, but may have a leading digit (e.g., 3com.com)."
- zeroimpl 6y agoFWIW 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-hostname-to-start-with-a-digit https://serverfault.com/questions/638260/is-it-valid-for-a-h...