mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
start collecting env
mutations
I'd like to put all env mutations together so we can understand how to change this code to call `call` on the controller
This commit is contained in:
parent
0adb8f8fa6
commit
f1fcf9b526
1 changed files with 3 additions and 5 deletions
|
@ -69,8 +69,6 @@ module ActionController
|
|||
if ENCODER.should_multipart?(non_path_parameters)
|
||||
@env['CONTENT_TYPE'] = ENCODER.content_type
|
||||
data = ENCODER.build_multipart non_path_parameters
|
||||
@env['CONTENT_LENGTH'] = data.length.to_s
|
||||
@env['rack.input'] = StringIO.new(data)
|
||||
else
|
||||
@env['CONTENT_TYPE'] ||= 'application/x-www-form-urlencoded'
|
||||
|
||||
|
@ -92,10 +90,10 @@ module ActionController
|
|||
else
|
||||
raise "Unknown Content-Type: #{content_type}"
|
||||
end
|
||||
|
||||
@env['CONTENT_LENGTH'] = data.length.to_s
|
||||
@env['rack.input'] = StringIO.new(data)
|
||||
end
|
||||
|
||||
@env['CONTENT_LENGTH'] = data.length.to_s
|
||||
@env['rack.input'] = StringIO.new(data)
|
||||
end
|
||||
|
||||
path_parameters[:controller] = controller_path
|
||||
|
|
Loading…
Reference in a new issue