Skip to content

Comment on Why did base64 win against uuencode?parent

Comments

And now we can have whitespace in url queries but we are still using %20 everywhere because "that's standard"...

Try copy-pasting a link that has actual whitespace in its URL queries and see if it gets linkified correctly. Just because you can doesn't mean you should! A space is like the one delimiter that is applicable for separating out URLs from the context of a larger blob of text.

Browsers will often display %20 as a space, but that's not the same thing as spaces being legal within URLs.

You are right. Seems firefox displays %20 as whitespace and converts whitespace to %20 when you use it. Chrome displays it as %20 but still converts whitespace to %20 if you try to use it.

Space is not legal at the HTTP request level, because the opening line uses space as a delimiter like:

    GET /your/path-to/the.file HTTP/1.1

Have fun with newline and spaces/tabs conversions when allowing whitespace in URLs.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.