diff options
Diffstat (limited to 'httpd.cpp')
-rw-r--r-- | httpd.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -23,15 +23,7 @@ void HTTP::Server::handle_accept(Connection::p new_connection, const boost::syst } void HTTP::Server::handle_request(Connection::p connection) { - std::string handler; - - if(connection->path.size()) { - // Pop first element of path. - handler = connection->path.front(); - connection->path.erase(connection->path.begin()); - } else { - handler = "index"; - } + std::string handler = connection->pop_path_base(); if(handlers.count(handler)) { // Call handler. |