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.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision

Event Timeline

epriestley created this task.
epriestley added a revision: Restricted Differential Revision.Jan 28 2021, 12:34 AM
epriestley added a commit: Restricted Diffusion Commit.Jan 28 2021, 4:53 PM
epriestley added a commit: Restricted Diffusion Commit.Jan 28 2021, 5:14 PM