aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/mime_negotiation.rb
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-04-28 20:26:58 -0400
committerJon Moss <me@jonathanmoss.me>2016-04-28 20:26:58 -0400
commite0b5a773ccb9c31a3fb76ba88813b6e41ca41466 (patch)
tree4c94010e3163b0e5dbc4e6f326c52557b5143e7c /actionpack/lib/action_dispatch/http/mime_negotiation.rb
parent39144740e8564a4e79e54ecfcd7a4fe8556b63e6 (diff)
downloadrails-e0b5a773ccb9c31a3fb76ba88813b6e41ca41466.tar.gz
rails-e0b5a773ccb9c31a3fb76ba88813b6e41ca41466.tar.bz2
rails-e0b5a773ccb9c31a3fb76ba88813b6e41ca41466.zip
Remove last uses of `@env[]` and `@env[]=`
Last August (2015), @tenderlove worked to remove all `@env[]` and `@env[]=`, in favor of using `set_header`, `get_header`, etc. (Here's an [example commit](https://github.com/rails/rails/commit/f16a33b68efc3dc57cfafa27651b9a765e363fbf)). This PR should remove the last uses of these methods, and fully convert them to the newly standardized API.
Diffstat (limited to 'actionpack/lib/action_dispatch/http/mime_negotiation.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_negotiation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
index e9b25339dc..0a58ce2b96 100644
--- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb
+++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
@@ -164,7 +164,7 @@ module ActionDispatch
end
def format_from_path_extension
- path = @env['action_dispatch.original_path'] || @env['PATH_INFO']
+ path = get_header('action_dispatch.original_path') || get_header('PATH_INFO')
if match = path && path.match(/\.(\w+)\z/)
Mime[match.captures.first]
end