GitLab Pages breaks on mixed-case group and project names
Projects with mixed-cases names cannot be accessed from
group.gitlab.io/project - i.e., the lowercased version - and projects in groups with mixed-case names cannot be accessed at all
Steps to reproduce
Create a project and group with mixed-case names and deploy a Pages build
- https://gitlab.com/nick.thomas/HuGo -> https://nick.thomas.gitlab.io/HuGo | https://nick.thomas.gitlab.io/hugo
- https://gitlab.com/TestMixedCase/HuGo -> https://testmixedcase.gitlab.io/HuGo | https://testmixedcase.gitlab.io/hugo | https://TestMixedCase.gitlab.io/HuGo
What is the current bug behavior?
The group name goes into the
Host: header, which Gitlab Pages downcases before looking up in the filesystem. However, in Gitlab Rails,
Project#pages_path includes the mixed-case group and project names.
What is the expected correct behavior?
Gitlab Pages should be able to serve groups and projects in a case-insensitive manner
- Unconditionally downcase group and project paths before using them in Pages.
- Include a migration to downcase existing directories in
- double-check that custom domains are served in a case-insensitive way!