Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-11-30 14:55:04 +0300
committerDouwe Maan <douwe@selenight.nl>2018-12-03 14:29:01 +0300
commit19ad2a4987c3ce8d15b9f778333701597252855f (patch)
treee15435092cf49ceae2eb0a48c6c181f444274826 /app/controllers/projects/commits_controller.rb
parent16f7243fefff4a65cee777e5d2b00800872ab6a4 (diff)
Revert "[Rails5] Set request.format in commits_controller"
This reverts commit 6da19415531e4c40f48df2c604efe51578cea295. # Conflicts: # app/controllers/projects/commits_controller.rb
Diffstat (limited to 'app/controllers/projects/commits_controller.rb')
-rw-r--r--app/controllers/projects/commits_controller.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb
index 8ba18aacc58..e40a1a1d744 100644
--- a/app/controllers/projects/commits_controller.rb
+++ b/app/controllers/projects/commits_controller.rb
@@ -12,7 +12,6 @@ class Projects::CommitsController < Projects::ApplicationController
before_action :assign_ref_vars, except: :commits_root
before_action :authorize_download_code!
before_action :set_commits, except: :commits_root
- before_action :set_request_format, only: :show
def commits_root
redirect_to project_commits_path(@project, @project.default_branch)
@@ -71,19 +70,6 @@ class Projects::CommitsController < Projects::ApplicationController
@commits = set_commits_for_rendering(@commits)
end
- # Rails 5 sets request.format from the extension.
- # Explicitly set to :html.
- def set_request_format
- request.format = :html if set_request_format?
- end
-
- # Rails 5 sets request.format from extension.
- # In this case if the ref ends with `.atom`, it's expected to be the html response,
- # not the atom one. So explicitly set request.format as :html to act like rails4.
- def set_request_format?
- request.format.to_s == "text/html" || @commits.ref.ends_with?("atom")
- end
-
def whitelist_query_limiting
Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/42330')
end