diff options
author | eileencodes <eileencodes@gmail.com> | 2015-07-07 14:36:50 -0400 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-07 14:31:34 -0700 |
commit | 8363b879fe759f0645179f4521cc64795efbee6e (patch) | |
tree | 6450bbea30d76265236a1befdce5ca2b5372289e /actionpack/lib/action_dispatch | |
parent | ae29142142324545a328948e059e8b8118fd7a33 (diff) | |
download | rails-8363b879fe759f0645179f4521cc64795efbee6e.tar.gz rails-8363b879fe759f0645179f4521cc64795efbee6e.tar.bz2 rails-8363b879fe759f0645179f4521cc64795efbee6e.zip |
pass cookies from the jar in the HTTP_COOKIE header
we should be pushing the cookies in via headers rather than maintaining
some object and "recycling" it.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_request.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_request.rb b/actionpack/lib/action_dispatch/testing/test_request.rb index 4b9a088265..06e9abdd62 100644 --- a/actionpack/lib/action_dispatch/testing/test_request.rb +++ b/actionpack/lib/action_dispatch/testing/test_request.rb @@ -4,9 +4,10 @@ require 'rack/utils' module ActionDispatch class TestRequest < Request DEFAULT_ENV = Rack::MockRequest.env_for('/', - 'HTTP_HOST' => 'test.host', - 'REMOTE_ADDR' => '0.0.0.0', - 'HTTP_USER_AGENT' => 'Rails Testing' + 'HTTP_HOST' => 'test.host', + 'REMOTE_ADDR' => '0.0.0.0', + 'HTTP_USER_AGENT' => 'Rails Testing', + "rack.request.cookie_hash" => {}.with_indifferent_access ) def self.new(env = {}) @@ -63,12 +64,6 @@ module ActionDispatch @env['HTTP_ACCEPT'] = Array(mime_types).collect(&:to_s).join(",") end - alias :rack_cookies :cookies - - def cookies - @cookies ||= {}.with_indifferent_access - end - private def default_env |