normalize URI paths #233

closed cmc opened this on 2026-09-19 16:12 UTC · ux web

Discussion

cmc 2026-09-19 16:12 UTC

implement fixes for various URI bugs:

  • /cmc/ 404s but should alias/redirect to /cmc
  • /cmc/ccleberg/ 404s but should alias/redirect to /cmc/ccleberg
  • same for various other URIs. e.g., /cmc/-/snippets/
  • debate renaming /mrs to something else. maybe merges or simply mr; may warrant renaming other items like issues if we move to the singular-case mr
cmc 2026-09-19 16:21 UTC

Trailing slashes: !431. Any GET whose path only misses because of a trailing slash answers 301 to the path without it, so =/cmc/=, =/cmc/ccleberg/= and =/cmc/-/snippets/= all land. Paths that miss either way stay 404; POST is never redirected.

On renaming =/mrs=: recommend leaving it. The path is one of a set of plural nouns (=issues=, =builds=, =releases=, =milestones=, =labels=), and =/mrs= is the plural of the initialism the CLI already uses (=gitbay mr=). A singular =/mr= would be the only singular segment, and =/merges= names the event rather than the request (=/merges/12= reads as the twelfth merge). The rename touches about 36 files: 15 route patterns, six templates including the =mrs.html= file and the =eq $top "mrs"= nav mark, a dozen e2e files, the autolinker, and the iOS client's URL building, with no capability gained. If you still want it, =/merge-requests= is the only spelling that is both unambiguous and consistent with the rest, and it should ship with a permanent redirect from =/mrs= so existing links, feeds and commit-message references keep resolving.

referenced in commit 25772eed72 by cmc: httpd: redirect a trailing slash to the path without it

2026-09-19 19:22 UTC
cmc 2026-09-19 19:32 UTC

Trailing slashes shipped in !431, on main at =25772ee=. Decision on the rename: leaving =/mrs= as it is.

Closing.

referenced in commit c56ef893fb by cmc: web: a trailing-slash redirect cannot leave the site

2026-09-20 05:26 UTC