diff --git a/gex_httpd/priv/404.html b/gex_httpd/priv/404.html
deleted file mode 100644
index bfb09f3..0000000
--- a/gex_httpd/priv/404.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- QHL: 404
-
-
-
- 404 Not Found
-
-
diff --git a/gex_httpd/priv/500.html b/gex_httpd/priv/500.html
deleted file mode 100644
index 19d2057..0000000
--- a/gex_httpd/priv/500.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- QHL: 500
-
-
-
- 500 Internal Server Error
-
-
diff --git a/gex_httpd/src/gh_client.erl b/gex_httpd/src/gh_client.erl
index 9cc7292..3fd9a20 100644
--- a/gex_httpd/src/gh_client.erl
+++ b/gex_httpd/src/gh_client.erl
@@ -283,8 +283,7 @@ handle_entry(Socket, Entry) ->
respond(Socket, Response).
http_err(Socket, 404) ->
- HtmlPath = filename:join([zx:get_home(), "priv", "404.html"]),
- {ok, ResponseBody} = file:read_file(HtmlPath),
+ ResponseBody = bdy_404(),
Headers = [{"content-type", "text/html"}],
Response = #response{headers = Headers,
code = 404,
@@ -292,8 +291,7 @@ http_err(Socket, 404) ->
respond(Socket, Response);
% default error is 500
http_err(Socket, _) ->
- HtmlPath = filename:join([zx:get_home(), "priv", "500.html"]),
- {ok, ResponseBody} = file:read_file(HtmlPath),
+ ResponseBody = bdy_500(),
Headers = [{"content-type", "text/html"}],
Response = #response{headers = Headers,
code = 500,
@@ -301,6 +299,32 @@ http_err(Socket, _) ->
respond(Socket, Response).
+bdy_404() ->
+ [""
+ ""
+ ""
+ ""
+ "QHL: 404"
+ ""
+ ""
+ "404 Not Found
"
+ ""
+ ""].
+
+
+bdy_500() ->
+ [""
+ ""
+ ""
+ ""
+ "QHL: 500 Internal Server Error"
+ ""
+ ""
+ "500 Internal Server Error
"
+ ""
+ ""].
+
+
respond(Socket, R = #response{code = Code, headers = Headers, body = Body}) ->
Slogan = slogan(Code),
BodyBytes = iolist_to_binary(Body),