diff options
Diffstat (limited to 'src/blogc-runserver')
-rw-r--r-- | src/blogc-runserver/httpd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/blogc-runserver/httpd.c b/src/blogc-runserver/httpd.c index 274aa5e..6cbd198 100644 --- a/src/blogc-runserver/httpd.c +++ b/src/blogc-runserver/httpd.c @@ -102,8 +102,14 @@ handle_request(void *arg) free(abs_path); if (real_path == NULL) { - status_code = 404; - error(client_socket, 404, "Not Found"); + if (errno == ENOENT) { + status_code = 404; + error(client_socket, 404, "Not Found"); + } + else { + status_code = 500; + error(client_socket, 500, "Internal Server Error"); + } goto point2; } |