Bugfix of error document

This commit is contained in:
2020-12-13 20:33:46 +01:00
parent 3dbe356b87
commit 35b924eea5
2 changed files with 2 additions and 1 deletions

View File

@ -112,6 +112,7 @@ int client_request_handler(sock *client, int req_num) {
res.status->code >= 300 && res.status->code < 400 ? "info" : "error"); res.status->code >= 300 && res.status->code < 400 ? "info" : "error");
sprintf(buf, "%i", len); sprintf(buf, "%i", len);
http_add_header_field(&res.hdr, "Content-Length", buf); http_add_header_field(&res.hdr, "Content-Length", buf);
http_add_header_field(&res.hdr, "Content-Type", "text/html; charset=UTF-8");
} else { } else {
http_add_header_field(&res.hdr, "Content-Length", "0"); http_add_header_field(&res.hdr, "Content-Length", "0");
} }

View File

@ -143,7 +143,7 @@ const char *http_error_document =
" }\n" " }\n"
" h1 {\n" " h1 {\n"
" margin: 0.5em 0;\n" " margin: 0.5em 0;\n"
" font-size: 1.75em;\n" " font-size: 1.5em;\n"
" }\n" " }\n"
" p {\n" " p {\n"
" text-align: center;\n" " text-align: center;\n"