diff options
Diffstat (limited to 'include/routing.h')
-rw-r--r-- | include/routing.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/routing.h b/include/routing.h index e62cbce..87d492b 100644 --- a/include/routing.h +++ b/include/routing.h @@ -629,16 +629,13 @@ public: void handle(const request& req, response& res) { - // remove url params - auto editedUrl = req.url.substr(0, req.url.find("?")); - - auto found = trie_.find(editedUrl); + auto found = trie_.find(req.url); unsigned rule_index = found.first; if (!rule_index) { - CROW_LOG_DEBUG << "Cannot match rules " << editedUrl; + CROW_LOG_DEBUG << "Cannot match rules " << req.url; res = response(404); res.end(); return; @@ -649,7 +646,7 @@ public: if ((rules_[rule_index]->methods() & (1<<(uint32_t)req.method)) == 0) { - CROW_LOG_DEBUG << "Rule found but method mismatch: " << editedUrl << " with " << method_name(req.method) << "(" << (uint32_t)req.method << ") / " << rules_[rule_index]->methods(); + CROW_LOG_DEBUG << "Rule found but method mismatch: " << req.url << " with " << method_name(req.method) << "(" << (uint32_t)req.method << ") / " << rules_[rule_index]->methods(); res = response(404); res.end(); return; |