Hi
I'm getting a 404 when doing a GET on a nested resource _if_ the URL ends with a '/'. My implementation looks like:
class Controller(rest.RestController):
_custom_actions = {
'nested': ['GET'],
}
...
@wsme_pecan.wsexpose(unicode, unicode)
def nested(self, id):
return "test"
So when GET'ing my custom action it acts like:
$ curl -X GET "
http://localhost:6385/v1/resource/1/nested"
localhost.localdomain - - [31/Jul/2013 11:10:03] "GET /v1/resource/1/nested HTTP/1.1" 200 3
"test"
$ curl -X GET "
http://localhost:6385/v1/resource/1/nested/"
localhost.localdomain - - [31/Jul/2013 11:10:05] "GET /v1/resource/1/nested/ HTTP/1.1" 404 186
{"error_message": "<html>\n <head>\n <title>404 Not Found</title>\n </head>\n <body>\n <h1>404 Not Found</h1>\n The resource could not be found.<br /><br />\n\n\n\n </body>\n</html>"}
The versions of pecan and WSME I'm using are:
$ pip list | grep pecan
pecan (0.3.1)
$ pip list | grep WSME
WSME (0.5b2)
Did I do something wrong with the implementation? Can someone confirm if it's a bug?
Cheers,
Lucas