recess/recess — Issue #35: Error in procesing similar routers
Author: pattt
Created: 2012-01-12 17:57:13+00:00
State: open

if we have 2 similar routers with different parameters and request methods, processes only first one even if it not matches with request method. And throws error "METHOD not supported, supported METHODs are: ..."

for example:
/**
* !RespondsWith Xml, Json
* !Prefix webContacts/
*/
!Route POST, contacts/$parameter1
!Route GET, contacts/$parameter2

request:
GET:webContacts/contacts/1234

response:
"METHOD not supported, supported METHODs are: POST"

possible way to fix is change 173 string in file recess/framework/routing/RtNode.class.php from:
if($result->routeExists) {
to
if($result->routeExists && $result->methodIsSupported) {