This project is archived and is in readonly mode.
Changeset [2f4aaed7b3feb3be787a316fab3144c06bb21a27] by Michael Koziarski
Revision 2f4aaed7b3feb3be787a316fab3144c06bb21a27,
committed by Repository
· July 7th, 2008 @ 06:31 AM
Disable the Accept header by default
The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too. You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set:
config.action_controller.use_accept_header = true
A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present. This lets ajax pages still use format.js despite there being no params[:format]
10 changed files
-
M
actionpack/CHANGELOG -
M
actionpack/lib/action_controller/base.rb -
M
actionpack/lib/action_controller/caching/actions.rb -
M
actionpack/lib/action_controller/mime_responds.rb -
M
actionpack/lib/action_controller/request.rb -
M
actionpack/lib/action_view/base.rb -
M
actionpack/test/controller/caching_test.rb -
M
actionpack/test/controller/content_type_test.rb -
M
actionpack/test/controller/mime_responds_test.rb -
M
actionpack/test/controller/request_test.rb