[Rails5] Set request.format in commits_controller
What does this MR do?
Since Rails 5.0 request.format
is being set depending on the route extension.
In commits pages we pass a ref as a URL parameter.
If the ref is an extension-like, Rails converts it and sets to request.format
.
E.g. if the ref is some_branch.atom
, Rails starts responding with atom
format, but it should response with html
because .atom
is the part of ref name, not the format.
This MR explicitly sets request.format
to :html
when needed.
Are there points in the code the reviewer needs to double check?
No.
Why was this MR needed?
Screenshots (if relevant)
No.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a UX Designer -
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #48144 (closed) and #48143 (closed)
Edited by blackst0ne