Skip to content

ActionController::UnknownFormat should return HTTP 406 #20666

@chancancode

Description

@chancancode

From what I can tell, we are supposed to rescue this by default and return a 406 (Not Acceptable). At least on Rails 4.1 and 4.2 this doesn't seem to be the case – I generated a fresh Rails app with a scaffold resource and ran Rails server in production. curl -H "Accept: text/xml" http://localhost:3000/posts and curl http://localhost:3000/posts.xml both gives me a 500 instead.

Would be great if someone can look into this 😉

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions