diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-02-07 16:18:09 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-02-07 16:18:09 -0600 |
commit | 524d8edf68ab94315a128cbd7570d1cf4faf7d7a (patch) | |
tree | 9216f1a68194be1bc27a9e83de40205e1c419f4e /actionpack/lib/action_controller/session | |
parent | 0edb0a4facdf6de8d12a004b59232e1006b93cd9 (diff) | |
download | rails-524d8edf68ab94315a128cbd7570d1cf4faf7d7a.tar.gz rails-524d8edf68ab94315a128cbd7570d1cf4faf7d7a.tar.bz2 rails-524d8edf68ab94315a128cbd7570d1cf4faf7d7a.zip |
Update bundled Rack for Ruby 1.9 spec changes
Diffstat (limited to 'actionpack/lib/action_controller/session')
-rw-r--r-- | actionpack/lib/action_controller/session/abstract_store.rb | 9 | ||||
-rw-r--r-- | actionpack/lib/action_controller/session/cookie_store.rb | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/actionpack/lib/action_controller/session/abstract_store.rb b/actionpack/lib/action_controller/session/abstract_store.rb index 69620cfd50..2f2a7410af 100644 --- a/actionpack/lib/action_controller/session/abstract_store.rb +++ b/actionpack/lib/action_controller/session/abstract_store.rb @@ -139,12 +139,9 @@ module ActionController cookie << "; HttpOnly" if options[:httponly] headers = response[1] - case a = headers[SET_COOKIE] - when Array - a << cookie - when String - headers[SET_COOKIE] = [a, cookie] - when nil + unless headers[SET_COOKIE].blank? + headers[SET_COOKIE] << "\n#{cookie}" + else headers[SET_COOKIE] = cookie end end diff --git a/actionpack/lib/action_controller/session/cookie_store.rb b/actionpack/lib/action_controller/session/cookie_store.rb index 48db625f2b..a2543c1824 100644 --- a/actionpack/lib/action_controller/session/cookie_store.rb +++ b/actionpack/lib/action_controller/session/cookie_store.rb @@ -108,12 +108,9 @@ module ActionController end cookie = build_cookie(@key, cookie.merge(options)) - case headers[HTTP_SET_COOKIE] - when Array - headers[HTTP_SET_COOKIE] << cookie - when String - headers[HTTP_SET_COOKIE] = [headers[HTTP_SET_COOKIE], cookie] - when nil + unless headers[HTTP_SET_COOKIE].blank? + headers[HTTP_SET_COOKIE] << "\n#{cookie}" + else headers[HTTP_SET_COOKIE] = cookie end end |