Hacker News new | ask | show | jobs
by WesolyKubeczek 58 days ago
A sane configuration, of course, would collapse the slashes first, so it would be /?w=a&x=c&y=d&z=.

See, it’s because when we do these acrobatics with turning path elements into query parameters, we do it for humans, so they are more readable. Humans can make typos, and accidentally entering two slashes instead of one is not exactly unheard of.

If we do it for some other code, we shouldn’t be rewriting anything at all, and just use query parameters.