From aff2b6e4eb07e8eed09bbc6c4e1a3d46766e1e17 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 7 Jan 2019 00:35:53 -0800 Subject: Switch use of Rack::Request to ActionDispatch::Request As mentioned in https://gitlab.com/gitlab-org/gitlab-ee/issues/9035#note_129093444, Rails 5 switched ActionDispatch::Request so that it no longer inherits Rack::Request directly. A middleware that uses Rack::Request to read the environment may see stale request parameters if another middleware modifies the environment via ActionDispatch::Request. To be safe, we should be using ActionDispatch::Request everywhere. --- lib/gitlab/etag_caching/middleware.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/gitlab/etag_caching') diff --git a/lib/gitlab/etag_caching/middleware.rb b/lib/gitlab/etag_caching/middleware.rb index 0341f930b9c..a11d6b66409 100644 --- a/lib/gitlab/etag_caching/middleware.rb +++ b/lib/gitlab/etag_caching/middleware.rb @@ -8,7 +8,7 @@ module Gitlab end def call(env) - request = Rack::Request.new(env) + request = ActionDispatch::Request.new(env) route = Gitlab::EtagCaching::Router.match(request.path_info) return @app.call(env) unless route -- cgit v1.2.3