diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-11-25 01:24:45 +0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-25 04:38:51 +0800 |
commit | 18adbe9347727dc3eefe46395d52aafa347a0c73 (patch) | |
tree | e94d7b5f781406c21438186b769fdebe513fed4a /actionpack/lib/action_dispatch/http/mime_type.rb | |
parent | 5c9abb6cca4b6de7146c94779a34ae943e4ea4d8 (diff) | |
download | rails-18adbe9347727dc3eefe46395d52aafa347a0c73.tar.gz rails-18adbe9347727dc3eefe46395d52aafa347a0c73.tar.bz2 rails-18adbe9347727dc3eefe46395d52aafa347a0c73.zip |
process text/* if it appears in the middle of
HTTP_ACCEPT parameter
Diffstat (limited to 'actionpack/lib/action_dispatch/http/mime_type.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_type.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index 5ea49a23c7..08eab5634a 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -120,7 +120,11 @@ module Mime params, q = header.split(/;\s*q=/) if params params.strip! - list << AcceptItem.new(index, params, q) unless params.empty? + if params =~ TRAILING_STAR_REGEXP + parse_data_with_trailing_star($1).each { |m| list << AcceptItem.new(index, m.to_s, q) } + else + list << AcceptItem.new(index, params, q) unless params.empty? + end end end list.sort! |