summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2015-01-01 14:15:02 +0000
committerreyk <reyk@openbsd.org>2015-01-01 14:15:02 +0000
commitd89214cd0057d19bd4ebe1d592243635a42fba7b (patch)
tree8e79aa86d8a9387fed9ba5b84209ade2a082815b
parentConvert the openssl(1) enc command to the new option parsing and usage. (diff)
downloadwireguard-openbsd-d89214cd0057d19bd4ebe1d592243635a42fba7b.tar.xz
wireguard-openbsd-d89214cd0057d19bd4ebe1d592243635a42fba7b.zip
Use the HTML5 doctype for error and auto index pages because it is
shorter, newer, and the recommendation. From James Jerkins. Exclude the charset for now because it is not explicitly handled by httpd. OK validator.w3.org (This document was successfully checked as HTML5!)
-rw-r--r--usr.sbin/httpd/server_file.c5
-rw-r--r--usr.sbin/httpd/server_http.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c
index a476f370801..c2eca71c858 100644
--- a/usr.sbin/httpd/server_file.c
+++ b/usr.sbin/httpd/server_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server_file.c,v 1.42 2014/12/21 00:54:49 guenther Exp $ */
+/* $OpenBSD: server_file.c,v 1.43 2015/01/01 14:15:02 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -311,8 +311,7 @@ server_file_index(struct httpd *env, struct client *clt, struct stat *st)
"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"
diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c
index e317a3a6391..3a5d84e7ada 100644
--- a/usr.sbin/httpd/server_http.c
+++ b/usr.sbin/httpd/server_http.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server_http.c,v 1.57 2014/12/21 00:54:49 guenther Exp $ */
+/* $OpenBSD: server_http.c,v 1.58 2015/01/01 14:15:02 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -712,8 +712,7 @@ server_abort_http(struct client *clt, u_int code, const char *msg)
/* 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"