Lots of fixes, begin to think about timeouts

This commit is contained in:
Alex Hultman
2018-07-02 23:13:55 +02:00
parent 441d8bc4b4
commit a3dd3ef958
5 changed files with 67 additions and 19 deletions
+6 -1
View File
@@ -158,7 +158,12 @@ public:
}
void route(const char *method, unsigned int method_length, const char *url, unsigned int url_length, USERDATA userData) {
handlers[lookup(url, url_length)](userData, &params);
int index = lookup(url, url_length);
if (index != -1) {
handlers[index](userData, &params);
}
params.clear();
}
};