Explorar o código

Added the USER_AGENT to HTTP errors.

default hai 1 ano
pai
achega
202d99c815
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      httpd.c

+ 3 - 3
httpd.c

@@ -501,13 +501,13 @@ void httpd_connection(FILE *f)
     }
     }
 
 
     if (status == HTTP_STATUS_FORBIDDEN)
     if (status == HTTP_STATUS_FORBIDDEN)
-        body = xs_str_new("<h1>403 Forbidden</h1>");
+        body = xs_str_new("<h1>403 Forbidden (" USER_AGENT ")</h1>");
 
 
     if (status == HTTP_STATUS_NOT_FOUND)
     if (status == HTTP_STATUS_NOT_FOUND)
-        body = xs_str_new("<h1>404 Not Found</h1>");
+        body = xs_str_new("<h1>404 Not Found (" USER_AGENT ")</h1>");
 
 
     if (status == HTTP_STATUS_BAD_REQUEST && body != NULL)
     if (status == HTTP_STATUS_BAD_REQUEST && body != NULL)
-        body = xs_str_new("<h1>400 Bad Request</h1>");
+        body = xs_str_new("<h1>400 Bad Request (" USER_AGENT ")</h1>");
 
 
     if (status == HTTP_STATUS_SEE_OTHER)
     if (status == HTTP_STATUS_SEE_OTHER)
         headers = xs_dict_append(headers, "location", body);
         headers = xs_dict_append(headers, "location", body);