diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-01-09 05:01:39 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-01-09 05:01:39 +0300 |
commit | 0986039896e3158e56fbc583df15e4c7ec31b64f (patch) | |
tree | dc2556faa742fe970604cee4fbb6c83151d8b29d /lib | |
parent | 74dca275d2f318bddd70c7bd9cecc2c1f5acac73 (diff) | |
parent | aff2b6e4eb07e8eed09bbc6c4e1a3d46766e1e17 (diff) |
Merge branch 'sh-switch-rack-request-to-actionpack' into 'master'
Switch use of Rack::Request to ActionDispatch::Request
See merge request gitlab-org/gitlab-ce!24199
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/etag_caching/middleware.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/middleware/basic_health_check.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/middleware/read_only/controller.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/request_context.rb | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 6c1a730935a..aae54fb34bc 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -512,7 +512,7 @@ module API # `request`. We workaround this by defining methods that returns the right # values. def define_params_for_grape_middleware - self.define_singleton_method(:request) { Rack::Request.new(env) } + self.define_singleton_method(:request) { ActionDispatch::Request.new(env) } self.define_singleton_method(:params) { request.params.symbolize_keys } end 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 diff --git a/lib/gitlab/middleware/basic_health_check.rb b/lib/gitlab/middleware/basic_health_check.rb index f2a03217098..acf8c301b8f 100644 --- a/lib/gitlab/middleware/basic_health_check.rb +++ b/lib/gitlab/middleware/basic_health_check.rb @@ -24,7 +24,7 @@ module Gitlab def call(env) return @app.call(env) unless env['PATH_INFO'] == HEALTH_PATH - request = Rack::Request.new(env) + request = ActionDispatch::Request.new(env) return OK_RESPONSE if client_ip_whitelisted?(request) diff --git a/lib/gitlab/middleware/read_only/controller.rb b/lib/gitlab/middleware/read_only/controller.rb index 89941a9efa0..f142f9da43d 100644 --- a/lib/gitlab/middleware/read_only/controller.rb +++ b/lib/gitlab/middleware/read_only/controller.rb @@ -60,7 +60,7 @@ module Gitlab end def request - @env['rack.request'] ||= Rack::Request.new(@env) + @env['actionpack.request'] ||= ActionDispatch::Request.new(@env) end def last_visited_url diff --git a/lib/gitlab/request_context.rb b/lib/gitlab/request_context.rb index f8f8ec789ce..d9811e036d3 100644 --- a/lib/gitlab/request_context.rb +++ b/lib/gitlab/request_context.rb @@ -13,7 +13,7 @@ module Gitlab end def call(env) - req = Rack::Request.new(env) + req = ActionDispatch::Request.new(env) Gitlab::SafeRequestStore[:client_ip] = req.ip |