summaryrefslogtreecommitdiff
path: root/httpd.cpp
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-01-02 21:22:57 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-01-02 21:45:46 +0100
commit226fd63fab4b5b605c62049c6a9d765de8d6c4db (patch)
tree541e78e6e47117dccecdb1b56b5c666132305849 /httpd.cpp
parentf78248234b3f284b77a35b3249ccfb526d18c871 (diff)
Add PathList, fix path_p.
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.