404 When Clicking on 'Files' for Repository Called 'files'

Issue #178 new
Geert Linders created an issue

If I have a repository called 'files' and click on 'Files' in the repository view, Kallithea responds with a 404 page.

If I rename the repository, for instance, to 'files2' then Kallithea does show me the files inside the repository when clicking on 'Files'.

It seems that Kallithea becomes confused when it tries to parse a URL that contains the name 'files' twice in a row: <repo path>/files/files/tip

Comments (5)

  1. Mads Kiilerich

    Yes, the url naming scheme has collisions. It has issues both with collisions with reserved words and with '/' and other characters in values passed in URLs.

    I would like to change the scheme to something like https://kallithea-scm.org/repos/kallithea/~/files/tip/ or some other way to "escape" from the repo name so it unambiguously can be detected. Someone "just" have to come up with a good scheme and implement it in kallithea/config/routing.py ... and preserve the most common old URLs for backwards compatibility.

  2. Sam Jaques

    We also see the issue for files within a hg changeset having the same name with different capitalization. When clicking on the comment button within the second file diff, it jumps automatically to a comment box within the first file diff, making commenting on the second file impossible.

  3. Mads Kiilerich

    @sjaques That is a different problem, probably caused by "normalizing" file names when we shouldn't. Easy to fix ... but hard to do in a backwards compatible way that doesn't break all existing links ...

    It would be great if you can file a different issue for that.

  4. Log in to comment