From ad62d461e835fefd4c251c402b4e815de03e229d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=BCtke?= Date: Fri, 24 Nov 2006 16:35:00 +0000 Subject: Added CSV to Mime::SET so that respond_to csv will work git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/mime_type.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 3025519ab2..d5e347ad6c 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added CSV to Mime::SET so that respond_to csv will work [Cody Fauser] + * Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [DHH] * Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you don't even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH] diff --git a/actionpack/lib/action_controller/mime_type.rb b/actionpack/lib/action_controller/mime_type.rb index 1430f09fb1..81b84f7672 100644 --- a/actionpack/lib/action_controller/mime_type.rb +++ b/actionpack/lib/action_controller/mime_type.rb @@ -141,7 +141,7 @@ module Mime ATOM = Type.new "application/atom+xml", :atom YAML = Type.new "application/x-yaml", :yaml, %w( text/yaml ) - SET = [ ALL, TEXT, HTML, JS, ICS, XML, RSS, ATOM, YAML ] + SET = [ ALL, TEXT, HTML, JS, ICS, XML, RSS, ATOM, YAML, CSV ] LOOKUP = Hash.new { |h, k| h[k] = Type.new(k) unless k == "" } -- cgit v1.2.3