| ▲ | WesolyKubeczek 5 hours ago |
| It is probably “incorrect”, but given the established actual usage over the decades, it’s most likely what you need to do nevertheless. Not doing it is like punishing people for not using Oxford commas, or entering an hour long debate each time someone writes “would of” instead of “would have”. It grinds my gears too, but I have different hills to die on. |
|
| ▲ | bazoom42 5 hours ago | parent | next [-] |
| 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 5 hours ago | parent [-] | | if it is significant, you coded your app wrong, plain and simple | | |
| ▲ | jeroenhd 4 hours ago | parent | next [-] | | Of 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. | |
| ▲ | bazoom42 4 hours ago | parent | prev [-] | | Why? |
|
|
|
| ▲ | Etheryte 5 hours ago | parent | prev [-] |
| Not sure I agree. The correct thing is to not mess with the URL at all if you're unsure about what to be doing to it. Doing nothing is the easiest thing of them all, why not do that? |
| |
| ▲ | j16sdiz 5 hours ago | parent [-] | | because the you need some consistency or normalisation before applying ACL or do routing? | | |
| ▲ | jeroenhd 4 hours ago | parent [-] | | URL normalization is defined and it doesn't include collapsing slashes. Not that you can include custom normalization rules (like collapsing slashes, tolower()ing the entire path, removing the query part of the URL), but that's not part of the standard. If you're doing anything extra, the risk of breaking stuff is on you. |
|
|