diff --git a/404.html b/404.html new file mode 100644 index 0000000..2f7e56a --- /dev/null +++ b/404.html @@ -0,0 +1,9 @@ + + + 404 + + +

UH-OH

+

The page you were looking for could not be found.

+ + diff --git a/Main.java b/Main.java index b373e30..7036b9e 100644 --- a/Main.java +++ b/Main.java @@ -79,8 +79,7 @@ public class Main { sendResponse(client, "200 OK", contentType, Files.readAllBytes(filepath)); } else { // 404 - byte[] notFoundContent = "

404 Something went wrong

".getBytes(); - sendResponse(client, "404 Not Found", "text/html", notFoundContent); + sendResponse(client, "404 Not Found", "text/html", Files.readAllBytes(getFilePath("404.html"))); } }