Page MenuHomePhabricator

In Diffusion browse views, some trailing slash behavior could be improved
Open, LowPublic

Description

If you browse to a directory in Diffusion but omit the trailing slash (like /browse/master/src), the URI is not canonicalized. It would be slightly more consistent to canonicalize it by redirecting to the / variation, although this entails some possible complexity when browsing the history of a path which was sometimes a directory and sometimes a file.

If you browse to a file in Diffusion but add an extra slash (like /browse/master/README.txt/), the lookup 404s. It would be slightly better to identify that the file exists and redirect to the canonical URI without a trailing slash.

Beyond typing them in, one way to reach either URI is with arc browse, which does not (and probably should not) canonicalize.