Refactoring.

This commit is contained in:
yhirose 2012-10-03 21:55:01 -04:00
parent aa75fbb5f9
commit ffde8b7e4b
3 changed files with 84 additions and 54 deletions

View file

@ -89,8 +89,7 @@ int main(void)
svr.set_error_handler([](httplib::Connection& c) {
char buf[BUFSIZ];
snprintf(buf, sizeof(buf), "<p>Error Status: <span style='color:red;'>%d</span></p>", c.response.status);
c.response.body = buf;
c.response.set_header("Content-Type", "text/html");
c.response.set_content(buf, "text/html");
});
svr.set_logger([](const Connection& c) {