diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-12 18:50:14 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-12 18:50:14 +0000 |
commit | 09cec7824800bdd29c97356c71b51acf47ef6bcc (patch) | |
tree | 40fc15739537e9114f592ef7f7bed8e44071c43d /actionpack/lib | |
parent | e3ea34f7d30b9866da8f34be4108f8449218f9fd (diff) | |
download | rails-09cec7824800bdd29c97356c71b51acf47ef6bcc.tar.gz rails-09cec7824800bdd29c97356c71b51acf47ef6bcc.tar.bz2 rails-09cec7824800bdd29c97356c71b51acf47ef6bcc.zip |
Default mime type for XML should be application/xml [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/mime_type.rb | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/actionpack/lib/action_controller/mime_type.rb b/actionpack/lib/action_controller/mime_type.rb index 6a33fdc19a..13b00c5984 100644 --- a/actionpack/lib/action_controller/mime_type.rb +++ b/actionpack/lib/action_controller/mime_type.rb @@ -30,27 +30,30 @@ module Mime end end - ALL = Type.new "*/*", :all - HTML = Type.new "text/html", :html - JS = Type.new "text/javascript", :js, %w( application/javascript application/x-javascript ) - XML = Type.new "text/xml", :xml, %w( application/xml application/x-xml ) - RSS = Type.new "application/rss+xml", :rss - ATOM = Type.new "application/atom+xml", :atom - YAML = Type.new "application/x-yaml", :yaml + ALL = Type.new "*/*", :all + HTML = Type.new "text/html", :html, %w( application/xhtml+xml ) + JS = Type.new "text/javascript", :js, %w( application/javascript application/x-javascript ) + XML = Type.new "application/xml", :xml, %w( text/xml application/x-xml ) + RSS = Type.new "application/rss+xml", :rss + ATOM = Type.new "application/atom+xml", :atom + YAML = Type.new "application/x-yaml", :yaml LOOKUP = Hash.new { |h, k| h[k] = Type.new(k) } LOOKUP["*/*"] = ALL + LOOKUP["text/html"] = HTML - LOOKUP["application/rss+xml"] = RSS - LOOKUP["application/atom+xml"] = ATOM - LOOKUP["application/x-yaml"] = YAML + LOOKUP["application/xhtml+xml"] = HTML + + LOOKUP["application/xml"] = XML + LOOKUP["text/xml"] = XML + LOOKUP["application/x-xml"] = XML LOOKUP["text/javascript"] = JS LOOKUP["application/javascript"] = JS LOOKUP["application/x-javascript"] = JS - LOOKUP["text/xml"] = XML - LOOKUP["application/xml"] = XML - LOOKUP["application/x-xml"] = XML + LOOKUP["application/rss+xml"] = RSS + LOOKUP["application/atom+xml"] = ATOM + LOOKUP["application/x-yaml"] = YAML end
\ No newline at end of file |