diff options
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"); } } |