From 226fd63fab4b5b605c62049c6a9d765de8d6c4db Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 2 Jan 2011 21:22:57 +0100 Subject: Add PathList, fix path_p. --- httpd.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'httpd.cpp') diff --git a/httpd.cpp b/httpd.cpp index e2470c2..4d6ed02 100644 --- a/httpd.cpp +++ b/httpd.cpp @@ -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. -- cgit v1.2.3