summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-01-02 22:28:26 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-01-02 22:28:26 +0100
commit0e3c3380d519b033500b4ed1ccd3acf707c34372 (patch)
tree115cbbf0200fc34011e68b32e56d58458a72d87f /main.cpp
parent237c3e226b7c2ac391b0e8d354e5fc6f587a41ba (diff)
Merge HTTPResponse into HTTP::Connection.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/main.cpp b/main.cpp
index ebe3554..1099960 100644
--- a/main.cpp
+++ b/main.cpp
@@ -13,18 +13,11 @@
void foo_handler(HTTP::Connection::p connection) {
std::cout << "Handling!" << std::endl;
- HTTPResponse res(connection->socket);
-
- //MusicListing::p ml = music::get(connection->path);
- bool ml = 0;
+ MusicListing::p ml = music::get(connection->path);
if(ml) {
- res.code = 200;
- res.status = "OK";
-
- //ml->render(connection, res);
+ ml->render(connection);
} else {
- res.code = 404;
- res.status = "Not Found";
+ connection->send_error(404, "Not Found");
}
}