diff options
author | Dominic Cleal <dominic@cleal.org> | 2017-01-20 14:33:52 +0000 |
---|---|---|
committer | Dominic Cleal <dominic@cleal.org> | 2017-01-23 17:56:57 +0000 |
commit | 13c7f2b537b580beb5f3df29b8396d2157bdfdab (patch) | |
tree | 4a880692055af920da504e56e7f213c849b3e1e9 /actionpack/lib | |
parent | c309073c7476f50dfb1e796d058580f176101c36 (diff) | |
download | rails-13c7f2b537b580beb5f3df29b8396d2157bdfdab.tar.gz rails-13c7f2b537b580beb5f3df29b8396d2157bdfdab.tar.bz2 rails-13c7f2b537b580beb5f3df29b8396d2157bdfdab.zip |
Delete PATH_INFO after each controller test request
Prevents PATH_INFO from being used to infer the request format in later
test requests when no explicit format is given.
As the request PATH_INFO may be set before a request, it can't be
deleted during pre-request scrubbing.
Fixes #27774
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 7b620ac95e..7229c67f30 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -534,6 +534,7 @@ module ActionController @request.delete_header "HTTP_ACCEPT" end @request.query_string = "" + @request.env.delete "PATH_INFO" @response.sent! end |