Repository Files API not working with subdirectories
Summary
When I try to access the GitLab repository files API there are no slashes allowed in the path. So if I try to get
https://gitlab.example.com/api/v4/projects/13/repository/files/README.md?ref=master
it works just fine, but if I run
https://gitlab.example.com/api/v4/projects/13/repository/files/src%2FREADME.md?ref=master
then a 404 HTML error page is returned with the message that this file (with the slash not escaped anymore) is not found on this GitLab server. I am running GitLab 12.9.2 Onmibus installation on Debian 9.12.
What is the current bug behavior?
A slash is not allowed in the :filePath path parameter of the files API.
What is the expected correct behavior?
The slash as URL encoded %2F is resolved correctly and the corresponding file is returned.