diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-06 09:46:04 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-06 09:46:04 +0000 |
commit | dbf42e379becc5612a0efe3476a999a9d6d803f0 (patch) | |
tree | 63809e19f53fc202369acae0bd027ba2352b9d2a /actionpack/lib/action_controller/request.rb | |
parent | e0cded2bbfc72ebbdae5b3c5926dc67f8fb59631 (diff) | |
download | rails-dbf42e379becc5612a0efe3476a999a9d6d803f0.tar.gz rails-dbf42e379becc5612a0efe3476a999a9d6d803f0.tar.bz2 rails-dbf42e379becc5612a0efe3476a999a9d6d803f0.zip |
Prefer MIME constants to strings. Closes #7707.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/request.rb')
-rwxr-xr-x | actionpack/lib/action_controller/request.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index 38584a6481..cd80415f82 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -60,16 +60,16 @@ module ActionController begin # Receive header sans any charset information. content_type = @env['CONTENT_TYPE'].to_s.sub(/\s*\;.*$/, '').strip.downcase - + if x_post_format = @env['HTTP_X_POST_DATA_FORMAT'] case x_post_format.to_s.downcase when 'yaml' - content_type = 'application/x-yaml' + content_type = Mime::YAML.to_s when 'xml' - content_type = 'application/xml' + content_type = Mime::XML.to_s end end - + Mime::Type.lookup(content_type) end end |