Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions change-entries/pr62989.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*) Update DOCTYPE tags in server-generated HTML. PR62989.
[Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it>]
10 changes: 9 additions & 1 deletion docs/docroot/index.html
Original file line number Diff line number Diff line change
@@ -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>
4 changes: 4 additions & 0 deletions include/httpd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
2 changes: 1 addition & 1 deletion modules/examples/mod_example_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,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);
Expand Down
2 changes: 1 addition & 1 deletion modules/generators/mod_autoindex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion modules/generators/mod_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
"<html><head>\n"
"<title>Apache Status</title>\n"
"</head><body>\n"
Expand Down
2 changes: 1 addition & 1 deletion modules/http/http_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
"<html><head>\n<title>", title,
"</title>\n</head><body>\n<h1>", h1, "</h1>\n",
NULL);
Expand Down
2 changes: 1 addition & 1 deletion modules/ldap/util_ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
"<html><head><title>LDAP Cache Information</title></head>\n", r);
ap_rputs("<body bgcolor='#ffffff'><h1 align=center>LDAP Cache Information"
"</h1>\n", r);
Expand Down
2 changes: 1 addition & 1 deletion modules/mappers/mod_imagemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<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);

Expand Down
2 changes: 1 addition & 1 deletion modules/proxy/mod_proxy_balancer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
"<html><head><title>Balancer Manager</title>\n", r);
ap_rputs("<style type='text/css'>\n"
"table {\n"
Expand Down
2 changes: 1 addition & 1 deletion modules/proxy/mod_proxy_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,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"
Expand Down
Loading