diff --git a/src/middleware/notfound.cpp b/src/middleware/notfound.cpp index 7ae46ce..990b4ff 100644 --- a/src/middleware/notfound.cpp +++ b/src/middleware/notfound.cpp @@ -1,3 +1,4 @@ +#include "../http/mime.hpp" #include "notfound.hpp" #include @@ -11,17 +12,17 @@ namespace Middleware } response.code = HttpResponse::Code::NOT_FOUND; + response.contentType = Http::GetMimeType(Http::FileType::HTML); std::stringstream ss; - ss << "404 - file not found\n"; - ss << "File: "; - ss << request.url.GetPath() << '\n'; + ss << ""; + ss << "

404 - File Not Found

"; + ss << "

File: " << request.url.GetPath() << "

"; + ss << ""; auto responseContent = ss.str(); response.content.insert(response.content.begin(), responseContent.begin(), responseContent.end()); - - response.contentType = "text/plain"; } } \ No newline at end of file