1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

remove more direct env mutations

This commit is contained in:
Aaron Patterson 2015-08-24 17:07:48 -07:00
parent d4e1f58fd8
commit c82248ea86
2 changed files with 4 additions and 2 deletions

View file

@ -98,7 +98,9 @@ module ActionController
set_header 'rack.input', StringIO.new(data)
end
@env["PATH_INFO"] ||= generated_path
get_header("PATH_INFO") do |k|
set_header k, generated_path
end
path_parameters[:controller] = controller_path
path_parameters[:action] = action

View file

@ -160,7 +160,7 @@ XML
def setup
super
@controller = TestController.new
@request.env['PATH_INFO'] = nil
@request.delete_header 'PATH_INFO'
@routes = ActionDispatch::Routing::RouteSet.new.tap do |r|
r.draw do
get ':controller(/:action(/:id))'