Fix routing for /info/refs
What does this MR do and why?
Contributes to #361962 (closed), #343150 (closed)
Problem
When the project has name info
the URL to fetch refs
:namespace/:project/refs
is masked by the redirection logic for
info/refs
endpoint.
For example, path my-namespace/info/refs
will trigger the redirect
to my-namespace.git/info/refs
which is incorrect.
Solution
Fix container path verification logic. Ensure that the path
is a
project path or a wiki path.
Screenshots or screen recordings
Before | After |
---|---|
http://127.0.0.1:3000/root/info/refs
How to set up and validate locally
- Create project with the name
info
- Visit URL: http://127.0.0.1:3000/root/info/refs
- You should see a list of refs instead of a redirect to http://127.0.0.1:3000/root.git/info/refs
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin