Skip to content

Stopped redirecting when using lowercase repo names #18774

@AbdulrhmnGhanem

Description

@AbdulrhmnGhanem

Gitea Version

609c916

Git Version

No response

Operating System

No response

How are you running Gitea?

https://try.gitea.io

Database

No response

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

  • Previously, GET {username}/{reponame}/raw///file-path (the middle two slashes are blank to get the default branch) when the repo name has uppercase letters, e.g., https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware, using a lowercase version of the name redirected to the correct URL

  • In other words, both

    • GET https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware/raw///images/back.png
    • GET https://try.gitea.io/AbdulrhmnGhanem/ch330_hardware/raw///images/back.png

    were redirecting to
    GET https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware/raw/branch/master/images/back.png
    This isn't the case after Multiple Escaping Improvements #17551. Specifically because of this line.

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions