From 06842721d7da53a2235e6e4071760588ec285f90 Mon Sep 17 00:00:00 2001 From: Antony Woods Date: Tue, 14 Oct 2014 09:48:35 +0100 Subject: Wrapped qs_parse as query_string and added tests --- include/routing.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include/routing.h') 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; -- cgit v1.2.3-54-g00ecf From bdc9dd8d480b2d116b80f795f38cc8ed28dbb93d Mon Sep 17 00:00:00 2001 From: ipknHama Date: Fri, 24 Oct 2014 02:45:34 +0900 Subject: added missing header for amalgate --- include/common.h | 1 + include/http_connection.h | 1 + include/http_server.h | 1 + include/json.h | 1 + include/routing.h | 1 + 5 files changed, 5 insertions(+) (limited to 'include/routing.h') diff --git a/include/common.h b/include/common.h index 5720b46..d19076a 100644 --- a/include/common.h +++ b/include/common.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include "utility.h" diff --git a/include/http_connection.h b/include/http_connection.h index 537be89..d88bc25 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -5,6 +5,7 @@ #include #include #include +#include #include "http_parser_merged.h" diff --git a/include/http_server.h b/include/http_server.h index 484aa83..2241dec 100644 --- a/include/http_server.h +++ b/include/http_server.h @@ -5,6 +5,7 @@ #include #include #include +#include #include diff --git a/include/json.h b/include/json.h index 9306e2a..d79fe88 100644 --- a/include/json.h +++ b/include/json.h @@ -10,6 +10,7 @@ #include #include #include +#include #if defined(__GNUG__) || defined(__clang__) #define crow_json_likely(x) __builtin_expect(x, 1) diff --git a/include/routing.h b/include/routing.h index 87d492b..9f607f1 100644 --- a/include/routing.h +++ b/include/routing.h @@ -6,6 +6,7 @@ #include #include #include +#include #include "common.h" #include "http_response.h" -- cgit v1.2.3-54-g00ecf