3 ms·
If different clients does it differently, you have incompatibilies. This punishes everybody. Since normalizing // to / removes information which may be signific
by bazoom42 6mo ago
If different clients does it differently, you have incompatibilies. This punishes everybody. Since normalizing // to / removes information which may be significant, the obviously correct choice is folllowing the spec.
- PunchyHamster 6mo agoif it is significant, you coded your app wrong, plain and simple
- jeroenhd 6mo agoOf course not. It's an explicit feature part of every specification. Plenty of websites rewrite paths like /a/b/c/d into a backend service call like /?w=a&x=b&y=c&z=d. In that scheme, /a//c/d would rewrite to /?w=a&x=&y=c&z=d, something entirely distinct from /a/c/d working out to /?w=a&x=b&y=c It's not the application's fault that the people attempting to configure web server URLs don't know how web server URLs work.
- WesolyKubeczek 6mo agoA 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.
- deleted 6mo ago[deleted]
- bazoom42 6mo agoWhy?