| ▲ | echoangle 4 hours ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> Wait, are there any implementations that wrongly collapse double-slashes? > nginx with merge_slashes How can it be wrong if it is server-side? If the server wants to treat those paths equally, it can if it wants to. It would only be wrong if a client does it and requests a different URL than the user entered, right? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | leni536 3 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
It can't be. It's the same confusion as "email address normalization" being wrong (for example when gmail ignores dots when mapping an address to an inbox). It matters where the normalization happens, and server-side behavior is out-of-scope of these identifier RFCs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | OoooooooO 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Yeah I would say that falls under the origin defining both paths as equivalent. > Therefore, collapsing // to / in HTTP URL path segments is not correct normalization. It produces a different, non-equivalent identifier unless the origin explicitly defines those two paths as equivalent. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | cxr 2 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nginx is frequently used as a reverse proxy and not "the server" (or only to the extent that it's the client-facing server). Its defaults assume that it's fine to do a "normalization" pass to remove double slash, etc., even though that's potentially out of step with how the actual content/application server wishes to deal with those requests. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||