[AC-1990] ACS: Filters not executing with uppercase routes
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-01-19T22:04:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | config, node-acs |
Reporter | Manuel Conde Vendrell |
Assignee | Mostafizur Rahman |
Created | 2013-12-10T08:52:47.000+0000 |
Updated | 2016-03-08T07:40:55.000+0000 |
Description
I had some filters defined in my app working well until I created a new one with an uppercase letter. This new filter is not executed at all.
Example:
{
"routes":
[
{"path": "/", "callback": "application#index"},
{"path": "/login", "method":"post", "callback": "useraccess#login"},
{"path": "/logout", "callback": "useraccess#logout"},
{"path": "/admin", "callback": "application#home"},
{"path": "/messages", "callback": "messages#list"},
{"path": "/changePwd", "callback": "users#changePassword"}
],
"filters":
[
{"path": "/admin", "callback": "session_filter#validateAdmin"},
{"path": "/admin/*", "callback": "session_filter#validateAdmin"},
{"path": "/logout", "callback": "session_filter#validateSession"},
{"path": "/changePwd", "callback": "session_filter#validateSession"},
{"path": "/messages", "callback": "session_filter#validateSession"},
{"path": "/messages/*", "callback": "session_filter#validateSession"}
],
}
With that code, only the filter *{"path": "/changePwd", "callback": "session_filter#validateSession"}* will not be executed.
If I change it for *{"path": "/changepwd", "callback": "session_filter#validateSession"}* then it works (even leaving the route with the uppercase).
This stuck me for a lot of hours until I notice that uppercase letter, making a lot of different test this the validate function instead with the config.json.
In the docs there is no reference to this, so I suppose it is an annoying bug.
Hello, I tested this with my sample code. I can’t reproduce this issue. It’s working as expected. I did not notice the case sensitive nature of the filters. If you have different test case that reproduces the issue, please post your sample here. For more information please visit: http://docs.appcelerator.com/cloud/latest/#!/guide/node
Test Environment
Mac OS X 10.8.5 Ti SDK 3.2.0.GATest Code
link: https://github.com/csemrm/NodeACSTest ThanksHi Mostafizur. This error only works in Ti 3.1.3GA, I've tested again the code in 3.1.3 and the error is still there. I suppose it is fixed in 3.2.0GA. Thank you for your time.