summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/http_server.cc5
-rw-r--r--src/lib/http_server.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/http_server.cc b/src/lib/http_server.cc
index 294d350ac..cf3f9756a 100644
--- a/src/lib/http_server.cc
+++ b/src/lib/http_server.cc
@@ -38,6 +38,7 @@ using std::vector;
Response Response::ERROR_404 = { 404, "<html><head><title>Error 404</title></head><body><h1>Error 404</h1></body></html>"};
+Response Response::ERROR_500 = { 500, "<html><head><title>Error 500</title></head><body><h1>Error 500</h1></body></html>"};
HTTPServer::HTTPServer(int port, int timeout)
@@ -156,8 +157,8 @@ HTTPServer::request(vector<string> const& request)
LOG_ERROR("Unknown exception while handling HTTP request");
}
- LOG_HTTP("404 {}", parts[0]);
- return Response::ERROR_404;
+ LOG_HTTP("500 {}", parts[0]);
+ return Response::ERROR_500;
}
diff --git a/src/lib/http_server.h b/src/lib/http_server.h
index 4c8acdc11..ca4f498e4 100644
--- a/src/lib/http_server.h
+++ b/src/lib/http_server.h
@@ -46,6 +46,7 @@ public:
void send(std::shared_ptr<Socket> socket);
static Response ERROR_404;
+ static Response ERROR_500;
private:
int _code;