summaryrefslogtreecommitdiff
path: root/httpd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'httpd.cpp')
-rw-r--r--httpd.cpp10
1 files changed, 1 insertions, 9 deletions
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.