Hello,

Based on the W3c moving HTML5 to "Recommendation" status on October 28, 2014, (http://www.w3.org/2014/10/html5-rec.html.en) these two patches update the built-in index documents in httpd(8) to HTML5.


Index: src/usr.sbin/httpd/server_file.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/server_file.c,v
retrieving revision 1.42
diff -u -p -u -r1.42 server_file.c
--- src/usr.sbin/httpd/server_file.c    21 Dec 2014 00:54:49 -0000      1.42
+++ src/usr.sbin/httpd/server_file.c    1 Jan 2015 07:15:52 -0000
@@ -311,11 +311,11 @@ server_file_index(struct httpd *env, str
            "sans-serif; }\nhr { border: 0; border-bottom: 1px dashed; }\n";
        /* Generate simple HTML index document */
        if (evbuffer_add_printf(evb,
-           "<!DOCTYPE HTML PUBLIC "
-           "\"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
+           "<!DOCTYPE html>\n"
            "<html>\n"
            "<head>\n"
            "<title>Index of %s</title>\n"
+           "<meta charset=\"utf-8\">\n"
            "<style type=\"text/css\"><!--\n%s\n--></style>\n"
            "</head>\n"
            "<body>\n"
Index: src/usr.sbin/httpd/server_http.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/server_http.c,v
retrieving revision 1.57
diff -u -p -u -r1.57 server_http.c
--- src/usr.sbin/httpd/server_http.c    21 Dec 2014 00:54:49 -0000      1.57
+++ src/usr.sbin/httpd/server_http.c    1 Jan 2015 07:15:52 -0000
@@ -712,11 +712,11 @@ server_abort_http(struct client *clt, u_

        /* Generate simple HTML error document */
        if ((bodylen = asprintf(&body,
-           "<!DOCTYPE HTML PUBLIC "
-           "\"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
+           "<!DOCTYPE html>\n"
            "<html>\n"
            "<head>\n"
            "<title>%03d %s</title>\n"
+           "<meta charset=\"utf-8\">\n"
            "<style type=\"text/css\"><!--\n%s\n--></style>\n"
            "</head>\n"
            "<body>\n"

Reply via email to