Hello!
Today I noticed, when looking at an autoindex page on my own website,
that despite the page being HTML (as evidenced by <hr> being used
rather than <hr/> further down, and also by the page being served as
text/html) there was a single instance of an XHTML-style element:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
Notice the second to last character, the slash.  This makes the META
element here invalid HTML.
This simple attached patch fixes this.
Thanks. :D
Index: server_file.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/server_file.c,v
retrieving revision 1.67
diff -u -p -r1.67 server_file.c
--- server_file.c       18 May 2020 14:40:06 -0000      1.67
+++ server_file.c       20 May 2020 22:16:22 -0000
@@ -488,7 +488,7 @@ server_file_index(struct httpd *env, str
            "<html>\n"
            "<head>\n"
            "<meta http-equiv=\"Content-Type\" content=\"text/html; "
-           "charset=utf-8\"/>\n"
+           "charset=utf-8\">\n"
            "<title>Index of %s</title>\n"
            "<style type=\"text/css\"><!--\n%s\n--></style>\n"
            "</head>\n"
Index: server_http.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/server_http.c,v
retrieving revision 1.138
diff -u -p -r1.138 server_http.c
--- server_http.c       18 May 2020 14:40:06 -0000      1.138
+++ server_http.c       20 May 2020 22:16:22 -0000
@@ -932,7 +932,7 @@ server_abort_http(struct client *clt, un
            "<html>\n"
            "<head>\n"
            "<meta http-equiv=\"Content-Type\" content=\"text/html; "
-           "charset=utf-8\"/>\n"
+           "charset=utf-8\">\n"
            "<title>%03d %s</title>\n"
            "<style type=\"text/css\"><!--\n%s\n--></style>\n"
            "</head>\n"

Reply via email to