Unimplemented REST methods should set a 405 status #4808

wants to merge 4 commits into


None yet
4 participants

corentin-larose commented Jul 11, 2013

Unimplemented http methods now set a 405 status

Corentin Larose added some commits Jun 13, 2013

Corentin Larose create, delete, get, getList and update method shouldn't be abstract …
…in AbstractRestfulController

Since no method is mandatory in REST, AbstractRestfulController shouldn't force to implement these methods (create, delete, get, getList and update) thus conducing to a concrete class with empty/unused methods.
Corentin Larose unimplemented http methods set a 405 status 19713ee

mwillbanks commented Jul 12, 2013

Please add in unit tests to verify the behavior.


corentin-larose commented Jul 15, 2013

My bad, should have done that.

Corentin Larose added some commits Jul 18, 2013


weierophinney commented Jul 19, 2013

Great idea -- wish I'd thought of this before!

@weierophinney weierophinney added a commit that referenced this pull request Jul 19, 2013

@weierophinney weierophinney Merge branch 'hotfix/4808' into develop
Forward port #4808

imel96 commented Jul 30, 2013

It looks better, but stated in rfc regarding 405 status: "...The response MUST include an Allow header containing a list of valid methods for the requested resource."
It's for that reason I use 501 (not implemented) because I don't have to return anything (SHOULD) while with 405 I MUST return something, although 501 is not perfect too (it's saying method not implemented for any resources).

corentin-larose deleted the unknown repository branch Mar 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment