Allow browsing branches that end with '.atom'
What does this MR do?
- Simplify the regex capture in the routing for the CommitsController to not exclude the '.atom' suffix. That's a perfectly valid git branch name, so we shouldn't blow up if we get it.
- Because Rails now can't automatically detect the request format, add
some code to do so in
ExtractPath
when there is no path. This means that, given branches 'foo' and 'foo.atom', the Atom feed for the former is unroutable. To fix this: don't do that! Give the branches different names!
Are there points in the code the reviewer needs to double check?
I don't really like the extra complexity in ExtractsPath
, but it seemed like that was the minimal change for this.
Why was this MR needed?
Creating a branch or tag name ending in '.atom' would cause some 500s on that repo.
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #21955. Related to !5994 (merged). /cc @vilhelmen
Merge request reports
Activity
Please register or sign in to reply