You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I must confess I didn't maintained the regexp matching when I moved to the new mongoose (I had to change mongoose a little to tel if a route is handled or not).
We should also test for matching in handles right now, this is indeed an issue.
hi
the fix of url regular expression matching doesn't work in this project.
i have tracked the issue & it seems it doesn't work because of:
bool Controller::handles(string method, string url)
{
string key = method + ":" + url;
as seen in the code routes is a map & when you try to find a matched url you failed
this function is called before the method:
Response *Controller::process(Request &request)
{
Response *response = NULL;
map<string, RequestHandlerBase *>::iterator it;
for (it=routes.begin(); it!=routes.end(); it++) {
if (request.match(it->first)){
response = it->second->process(request);
break;
}
}
return response;
}
which find a mtach by iterating the map & call request.match
The text was updated successfully, but these errors were encountered: