gitlab-org--gitlab-foss/changelogs/unreleased/blackst0ne-rails5-set-request-format-in--commits-controller.yml
blackst0ne 6da1941553 [Rails5] Set request.format in commits_controller
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 commit explicitly sets `request.format` to `:html` when needed.
2018-06-20 21:42:52 +11:00

5 lines
118 B
YAML

---
title: "[Rails5] Set request.format in commits_controller"
merge_request: 20023
author: "@blackst0ne"
type: fixed