]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
PR62989: DOCTYPE tags in server-generated HTML.
authorEric Covener <covener@apache.org>
Fri, 31 Jan 2020 02:38:05 +0000 (02:38 +0000)
committerEric Covener <covener@apache.org>
Fri, 31 Jan 2020 02:38:05 +0000 (02:38 +0000)
Submitted By: Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873397 13f79535-47bb-0310-9956-ffa450edef68

12 files changed:
CHANGES
docs/docroot/index.html
include/httpd.h
modules/dav/main/mod_dav.h
modules/examples/mod_example_hooks.c
modules/generators/mod_autoindex.c
modules/generators/mod_status.c
modules/http/http_protocol.c
modules/ldap/util_ldap.c
modules/mappers/mod_imagemap.c
modules/proxy/mod_proxy_balancer.c
modules/proxy/mod_proxy_ftp.c

diff --git a/CHANGES b/CHANGES
index acee69573542fc4ecf80091cf6344d2bbef27dae..821aff66d76142881e03ddac9ef37c51a70a7cd9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) Update DOCTYPE tags in server-generated HTML. PR62989.
+     [Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it>]
+
   *) mod_setenvif: Passing an env-variable parameter of "--early" in non-perdir
      context runs directives from this module before `RequestHeader ... early` 
      are evaluated. This allows results of SetEnvIf conditionals to be used 
index f5f1c377b64ac12a85119591b453c83b1a4afdbf..a4e4d11f560d351efcc690b038f202d88239b6cf 100644 (file)
@@ -1 +1,9 @@
-<html><body><h1>It works!</h1></body></html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>It works! Apache httpd</title>
+</head>
+<body>
+<p>It works!</p>
+</body>
+</html>
index 1c6a242a89210e767ea832d052e53646989ee461..03b7751fee4f22a4d37cd8e63d841d1f378ae17f 100644 (file)
@@ -249,6 +249,10 @@ extern "C" {
 #define DOCTYPE_HTML_4_0F "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
                           "DTD HTML 4.0 Frameset//EN\"\n" \
                           "\"http://www.w3.org/TR/REC-html40/frameset.dtd\">\n"
+/** HTML 4.01 Doctype */
+#define DOCTYPE_HTML_4_01 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n"
+/** HTML 5 Doctype */
+#define DOCTYPE_HTML_5 "<!DOCTYPE html>\n"
 /** XHTML 1.0 Strict Doctype */
 #define DOCTYPE_XHTML_1_0S "<!DOCTYPE html PUBLIC \"-//W3C//" \
                            "DTD XHTML 1.0 Strict//EN\"\n" \
index 45d325d52b45afbd9a40ade478e78e246357689b..813526dfeed67e0e4a44a6c553cd3714a2e6086d 100644 (file)
@@ -50,7 +50,7 @@ extern "C" {
 
 #define DAV_READ_BLOCKSIZE      2048    /* used for reading input blocks */
 
-#define DAV_RESPONSE_BODY_1     "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>"
+#define DAV_RESPONSE_BODY_1    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html>\n<head>\n<title>"
 #define DAV_RESPONSE_BODY_2     "</title>\n</head><body>\n<h1>"
 #define DAV_RESPONSE_BODY_3     "</h1>\n<p>"
 #define DAV_RESPONSE_BODY_4     "</p>\n"
index da00b8c7003717ef46b939cb9a241b06259d866c..b6a12cb4b50cbb602135976c44a1d246745e2cc5 100644 (file)
@@ -1007,7 +1007,7 @@ static int x_handler(request_rec *r)
      * Now send our actual output.  Since we tagged this as being
      * "text/html", we need to embed any HTML.
      */
-    ap_rputs(DOCTYPE_HTML_3_2, r);
+    ap_rputs(DOCTYPE_HTML_4_01, r);
     ap_rputs("<HTML>\n", r);
     ap_rputs(" <HEAD>\n", r);
     ap_rputs("  <TITLE>mod_example_hooks Module Content-Handler Output\n", r);
index c887056312d780b64c8f1cafaac16085ca6f8f82..21fc59a011f9127868718554df3057d1741a0235 100644 (file)
@@ -179,7 +179,7 @@ static void emit_preamble(request_rec *r, int xhtml, const char *title)
                   " <head>\n  <title>Index of ", title,
                   "</title>\n", NULL);
     } else {
-        ap_rvputs(r, DOCTYPE_HTML_3_2,
+        ap_rvputs(r, DOCTYPE_HTML_4_01,
                   "<html>\n <head>\n"
                   "  <title>Index of ", title,
                   "</title>\n", NULL);
index 5917953090b32cca5c34f17c86f5ce550457c3f2..8e80202c446e25a0adc6788a66a03a774fd19c77 100644 (file)
@@ -412,7 +412,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
                  "<html><head>\n"
                  "<title>Apache Status</title>\n"
                  "</head><body>\n"
index c52acf76d0aa3e6aeeef1bc5fead4a73492db771..899fb787e3bf0fb8d572d18fb3f5076d0f22347a 100644 (file)
@@ -1331,7 +1331,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
                   "<html><head>\n<title>", title,
                   "</title>\n</head><body>\n<h1>", h1, "</h1>\n",
                   NULL);
index e9b25d9d417fb8634a3d085bc65070715db2127c..e56041508f177ce93a53e8323dd376c58b27cf2f 100644 (file)
@@ -173,7 +173,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
              "<html><head><title>LDAP Cache Information</title></head>\n", r);
     ap_rputs("<body bgcolor='#ffffff'><h1 align=center>LDAP Cache Information"
              "</h1>\n", r);
index 8e76a089a63939d047c65e3f8bed131fa0bbd0a9..e770dcf4e5b31645efe75ffa2a528fc19a538b2c 100644 (file)
@@ -477,7 +477,7 @@ static void menu_header(request_rec *r, char *menu)
 {
     ap_set_content_type(r, "text/html; charset=ISO-8859-1");
 
-    ap_rvputs(r, DOCTYPE_HTML_3_2, "<html><head>\n<title>Menu for ",
+    ap_rvputs(r, DOCTYPE_HTML_4_01, "<html><head>\n<title>Menu for ",
               ap_escape_html(r->pool, r->uri),
               "</title>\n</head><body>\n", NULL);
 
index cbac1e16e723b5079d66024b0321b8754c149843..419f25e41f6446364b0020e470c243f69ce1412a 100644 (file)
@@ -1564,7 +1564,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
                  "<html><head><title>Balancer Manager</title>\n", r);
         ap_rputs("<style type='text/css'>\n"
                  "table {\n"
index 3ad5efec3596d1eb0b135fedfd2b4d4918d2360f..b60b9240512765550a7d8e0ceea2caaf8a8070ac 100644 (file)
@@ -524,7 +524,7 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
 
         /* print "ftp://host/" */
         escpath = ap_escape_html(p, path);
-        str = apr_psprintf(p, DOCTYPE_HTML_3_2
+        str = apr_psprintf(p, DOCTYPE_HTML_4_01
                 "<html>\n <head>\n  <title>%s%s%s</title>\n"
                 "<base href=\"%s%s%s\">\n"
                 " </head>\n"