diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-02 22:28:26 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-02 22:28:26 +0100 |
commit | 0e3c3380d519b033500b4ed1ccd3acf707c34372 (patch) | |
tree | 115cbbf0200fc34011e68b32e56d58458a72d87f /main.cpp | |
parent | 237c3e226b7c2ac391b0e8d354e5fc6f587a41ba (diff) |
Merge HTTPResponse into HTTP::Connection.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -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"); } } |