diff --git a/change-entries/pr62989.txt b/change-entries/pr62989.txt new file mode 100644 index 00000000000..72a0cfdc25f --- /dev/null +++ b/change-entries/pr62989.txt @@ -0,0 +1,2 @@ + *) Update DOCTYPE tags in server-generated HTML. PR62989. + [Andra Farkas , Giovanni Bechis ] diff --git a/docs/docroot/index.html b/docs/docroot/index.html index f5f1c377b64..a4e4d11f560 100644 --- a/docs/docroot/index.html +++ b/docs/docroot/index.html @@ -1 +1,9 @@ -

It works!

+ + + +It works! Apache httpd + + +

It works!

+ + diff --git a/include/httpd.h b/include/httpd.h index b4305b09f2f..573ef18381d 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -249,6 +249,10 @@ extern "C" { #define DOCTYPE_HTML_4_0F "\n" +/** HTML 4.01 Doctype */ +#define DOCTYPE_HTML_4_01 "\n" +/** HTML 5 Doctype */ +#define DOCTYPE_HTML_5 "\n" /** XHTML 1.0 Strict Doctype */ #define DOCTYPE_XHTML_1_0S "\n", r); ap_rputs(" \n", r); ap_rputs(" mod_example_hooks Module Content-Handler Output\n", r); diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 62804309ea6..715b49c7d74 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -179,7 +179,7 @@ static void emit_preamble(request_rec *r, int xhtml, const char *title) " <head>\n <title>Index of ", title, "\n", NULL); } else { - ap_rvputs(r, DOCTYPE_HTML_3_2, + ap_rvputs(r, DOCTYPE_HTML_4_01, "\n \n" " Index of ", title, "\n", NULL); diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index c1c856d41dd..f0cff67ac45 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -419,7 +419,7 @@ static int status_handler(request_rec *r) ap_get_loadavg(&t); if (!short_report) { - ap_rputs(DOCTYPE_HTML_3_2 + ap_rputs(DOCTYPE_HTML_4_01 "\n" "Apache Status\n" "\n" diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 3bc666e6d90..669a17d0b02 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1520,7 +1520,7 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) */ ap_rvputs_proto_in_ascii(r, - DOCTYPE_HTML_2_0 + DOCTYPE_HTML_4_01 "\n", title, "\n\n

", h1, "

\n", NULL); diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 3795fd42806..cf57b3d23cc 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -176,7 +176,7 @@ static int util_ldap_handler(request_rec *r) if (r->header_only) return OK; - ap_rputs(DOCTYPE_HTML_3_2 + ap_rputs(DOCTYPE_HTML_4_01 "LDAP Cache Information\n", r); ap_rputs("

LDAP Cache Information" "

\n", r); diff --git a/modules/mappers/mod_imagemap.c b/modules/mappers/mod_imagemap.c index b2dca7e1ee7..66d10bbb8c0 100644 --- a/modules/mappers/mod_imagemap.c +++ b/modules/mappers/mod_imagemap.c @@ -477,7 +477,7 @@ static void menu_header(request_rec *r, char *menu) { ap_set_content_type_ex(r, "text/html; charset=ISO-8859-1", 1); - ap_rvputs(r, DOCTYPE_HTML_3_2, "\nMenu for ", + ap_rvputs(r, DOCTYPE_HTML_4_01, "<html><head>\n<title>Menu for ", ap_escape_html(r->pool, r->uri), "\n\n", NULL); diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index daec21ad6c3..f5b228f0e32 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -1620,7 +1620,7 @@ static void balancer_display_page(request_rec *r, proxy_server_conf *conf, } else { ap_set_content_type(r, "text/html; charset=ISO-8859-1"); - ap_rputs(DOCTYPE_HTML_3_2 + ap_rputs(DOCTYPE_HTML_4_01 "Balancer Manager\n", r); ap_rputs("