diff options
author | Antony Woods <acron1@gmail.com> | 2014-10-14 09:48:35 +0100 |
---|---|---|
committer | Antony Woods <acron1@gmail.com> | 2014-10-14 09:48:35 +0100 |
commit | 06842721d7da53a2235e6e4071760588ec285f90 (patch) | |
tree | c72f69e9fe4154be039ba89e474395e21b6d5fdf /include/routing.h | |
parent | a8f6c5a92fea5439b4a0372ccc3b367e3c3bed3b (diff) | |
download | crow-06842721d7da53a2235e6e4071760588ec285f90.tar.gz crow-06842721d7da53a2235e6e4071760588ec285f90.zip |
Wrapped qs_parse as query_string and added tests
Diffstat (limited to 'include/routing.h')
-rw-r--r-- | include/routing.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/routing.h b/include/routing.h index d814266..ca88192 100644 --- a/include/routing.h +++ b/include/routing.h @@ -623,16 +623,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; |