diff options
author | Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local> | 2009-05-23 00:39:32 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local> | 2009-05-23 00:39:32 -0700 |
commit | e22a3d893ef8441fb52320315c5e348c6c208b69 (patch) | |
tree | efdbc4f2bece84bf500284a4a8dce9a7ef839324 /actionpack/lib/action_dispatch/http | |
parent | 3ac6d8f8b01fb04b8d6d35d75d802b41f4c256c9 (diff) | |
download | rails-e22a3d893ef8441fb52320315c5e348c6c208b69.tar.gz rails-e22a3d893ef8441fb52320315c5e348c6c208b69.tar.bz2 rails-e22a3d893ef8441fb52320315c5e348c6c208b69.zip |
Slightly modify things to get content type matching working without breaking other code
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rwxr-xr-x | actionpack/lib/action_dispatch/http/request.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 4831b89bde..259164d118 100755 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -173,9 +173,15 @@ module ActionDispatch def formats if ActionController::Base.use_accept_header - Array(Mime[parameters[:format]] || accepts) + ret = Array(Mime[parameters[:format]] || accepts) + if defined?(ActionController::Http) + if all = ret.index(Mime::ALL) + ret.delete(Mime::ALL) && ret.insert(all, *Mime::SET) + end + end + ret else - [format, Mime[:all]] + [format] + Mime::SET end end |