commit 202d99c
default
·
2025-01-20 07:39:06 +0000 UTC
parent f7ae252
Added the USER_AGENT to HTTP errors.
1 files changed,
+3,
-3
M
httpd.c
M
httpd.c
+3,
-3
1@@ -501,13 +501,13 @@ void httpd_connection(FILE *f)
2 }
3
4 if (status == HTTP_STATUS_FORBIDDEN)
5- body = xs_str_new("<h1>403 Forbidden</h1>");
6+ body = xs_str_new("<h1>403 Forbidden (" USER_AGENT ")</h1>");
7
8 if (status == HTTP_STATUS_NOT_FOUND)
9- body = xs_str_new("<h1>404 Not Found</h1>");
10+ body = xs_str_new("<h1>404 Not Found (" USER_AGENT ")</h1>");
11
12 if (status == HTTP_STATUS_BAD_REQUEST && body != NULL)
13- body = xs_str_new("<h1>400 Bad Request</h1>");
14+ body = xs_str_new("<h1>400 Bad Request (" USER_AGENT ")</h1>");
15
16 if (status == HTTP_STATUS_SEE_OTHER)
17 headers = xs_dict_append(headers, "location", body);