Skip to content
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

Merged
merged 6 commits into from
Mar 9, 2015

Conversation

0robustus1
Copy link
Contributor

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.

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

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.

@0robustus1 0robustus1 force-pushed the 1166-add_mimetype_info_to_controllers branch 2 times, most recently from 47ea3c3 to 23f0ab4 Compare March 4, 2015 11:02
]
] do
accept 'text/html'
accept 'text/plain'

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.

@eugenk eugenk self-assigned this Mar 6, 2015
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.
@0robustus1 0robustus1 force-pushed the 1166-add_mimetype_info_to_controllers branch from a5b62a5 to a6204b6 Compare March 6, 2015 14:58
]
] do
accept 'text/html'
accept 'text/plain'

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.

@eugenk
Copy link
Member

eugenk commented Mar 9, 2015

👍

0robustus1 added a commit that referenced this pull request Mar 9, 2015
…ollers

1166 add mimetype info to controllers
@0robustus1 0robustus1 merged commit 75f8650 into staging Mar 9, 2015
@0robustus1 0robustus1 deleted the 1166-add_mimetype_info_to_controllers branch March 9, 2015 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add supported mime-types for every controller
3 participants