Refactor prepare (API Change)

This commit is contained in:
Vinnie Falco
2017-06-05 21:11:33 -07:00
parent 2af19481a9
commit 2df6783468
26 changed files with 543 additions and 362 deletions

View File

@@ -169,7 +169,7 @@ private:
res.insert("Server", "http_sync_server");
res.insert("Content-Type", "text/html");
res.body = "The file '" + path + "' was not found";
prepare(res);
res.prepare();
write(sock, res, ec);
if(ec)
break;
@@ -184,7 +184,7 @@ private:
res.insert("Server", "http_sync_server");
res.insert("Content-Type", mime_type(path));
res.body = path;
prepare(res);
res.prepare();
write(sock, res, ec);
if(ec)
break;
@@ -199,7 +199,7 @@ private:
res.insert("Content-Type", "text/html");
res.body =
std::string{"An internal error occurred: "} + e.what();
prepare(res);
res.prepare();
write(sock, res, ec);
if(ec)
break;