Please sign in to comment.
Got tests to pass with some more changes.
* request.formats is much simpler now * For XHRs or Accept headers with a single item, we use the Accept header * For other requests, we use params[:format] or fallback to HTML * This is primarily to work around the fact that browsers provide completely broken Accept headers, so we have to whitelist the few cases we can specifically isolate and treat other requests as coming from the browser * For APIs, we can support single-item Accept headers, which disambiguates from the browsers * Requests to an action that only has an XML template from the browser will no longer find the template. This worked previously because most browsers provide a catch-all */*, but this was mostly accidental behavior. If you want to serve XML, either use the :xml format in links, or explicitly specify the XML template: render "template.xml".
- Loading branch information...
Showing with 123 additions and 127 deletions.
- +15 −7 actionpack/lib/action_controller/metal/rendering_controller.rb
- +1 −1 actionpack/lib/action_controller/testing/process.rb
- +12 −24 actionpack/lib/action_dispatch/http/request.rb
- +12 −1 actionpack/lib/action_view/base.rb
- +3 −2 actionpack/lib/action_view/helpers/prototype_helper.rb
- +1 −1 actionpack/lib/action_view/template/resolver.rb
- +1 −1 actionpack/test/controller/content_type_test.rb
- +17 −34 actionpack/test/controller/mime_responds_test.rb
- +3 −3 actionpack/test/controller/render_js_test.rb
- +1 −1 actionpack/test/dispatch/mime_type_test.rb
- +30 −33 actionpack/test/dispatch/request_test.rb
- +0 −1 actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml
- +10 −10 actionpack/test/lib/fixture_template.rb
- +2 −2 actionpack/test/new_base/content_type_test.rb
- +1 −1 actionpack/test/new_base/render_layout_test.rb
- +3 −4 actionpack/test/new_base/render_rjs_test.rb
- +1 −1 actionpack/test/new_base/render_template_test.rb
- +4 −0 actionpack/test/template/prototype_helper_test.rb
- +2 −0 actionpack/test/template/render_test.rb
Oops, something went wrong.