-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1166 add mimetype info to controllers #1240
Conversation
In order to return a correct 406 response we need to remove mime constraints from routes where we do not actually use them for routing. This currently holds true for all routes.
This includes Logics, Repositories, Ontologies, Sentences, Symbols and Mappings.
@@ -0,0 +1 @@ | |||
Mime::Type.register 'application/rdf+xml', :rdf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
47ea3c3
to
23f0ab4
Compare
] | ||
] do | ||
accept 'text/html' | ||
accept 'text/plain' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Add the mime-type information (respond_to) to the specific controllers. This will ensure that they will return a 406 if no acceptable mime-type was requested.
a5b62a5
to
a6204b6
Compare
] | ||
] do | ||
accept 'text/html' | ||
accept 'text/plain' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
👍 |
…ollers 1166 add mimetype info to controllers
I've reduced that to the API relevant controllers, as i'm not entirely sure what all controllers should actually respond to. So this will close #1166.