summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2016-03-08 09:33:15 +0000
committerflorian <florian@openbsd.org>2016-03-08 09:33:15 +0000
commitf5ec6fb644ba5f69ce5f2c4374e82cb6cb2b1e04 (patch)
tree406018504314bd3be501c606eb6182eab6308321
parent- bridge_localbroadcast() must call pf_pkt_addr_changed() (diff)
downloadwireguard-openbsd-f5ec6fb644ba5f69ce5f2c4374e82cb6cb2b1e04.tar.xz
wireguard-openbsd-f5ec6fb644ba5f69ce5f2c4374e82cb6cb2b1e04.zip
Set content charset for auto index generated page.
Pointed out and diff by dhill, thanks! Tweaks and same change for error documents by me.
-rw-r--r--usr.sbin/httpd/server_file.c4
-rw-r--r--usr.sbin/httpd/server_http.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c
index e060124911b..01840187cbb 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.60 2015/08/03 11:45:17 florian Exp $ */
+/* $OpenBSD: server_file.c,v 1.61 2016/03/08 09:33:15 florian Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -484,6 +484,8 @@ server_file_index(struct httpd *env, struct client *clt, struct stat *st)
"<!DOCTYPE html>\n"
"<html>\n"
"<head>\n"
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; "
+ "charset=utf-8\"/>\n"
"<title>Index of %s</title>\n"
"<style type=\"text/css\"><!--\n%s\n--></style>\n"
"</head>\n"
diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c
index e609de4af01..37e83be3b44 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.105 2016/02/11 19:30:04 tim Exp $ */
+/* $OpenBSD: server_http.c,v 1.106 2016/03/08 09:33:15 florian Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -816,6 +816,8 @@ server_abort_http(struct client *clt, unsigned int code, const char *msg)
"<!DOCTYPE html>\n"
"<html>\n"
"<head>\n"
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; "
+ "charset=utf-8\"/>\n"
"<title>%03d %s</title>\n"
"<style type=\"text/css\"><!--\n%s\n--></style>\n"
"</head>\n"