Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2012.1
-
None
Description
If you specifically declare http methods when defining the routes, you'll incorrectly get a 404 instead of a 405 if using invalid http methods.
Like this
new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/types/:typeId', 'ezx\\RestApi\\Controller
ContentType', 'load', array(), 'http-get' ), 1 ),
new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/types/:typeId', 'ezx\\RestApi\\Controller
ContentType', 'load', array(), 'http-put' ), 1 ),
You'll get a 404 if accessing the resource defined above with for instance a POST request
FYI :
If you don't provide the 5th paramater ('http-get') but instead uses the supportedProtocols property, then you'll correctly get a 405
This bug is an result of EZPNEXT-177