From 26785ceafe2b5d1d1989e5fe09132f2a112213ff Mon Sep 17 00:00:00 2001 From: Stephen Zhang Date: Mon, 28 Dec 2015 14:41:54 +0800 Subject: [PATCH] Add '' to the html header I think most non-English user would need it to fix error encoding in displaying file name in the web page. --- darkhttpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/darkhttpd.c b/darkhttpd.c index b8d4180..a29a45a 100644 --- a/darkhttpd.c +++ b/darkhttpd.c @@ -1733,7 +1733,7 @@ static void generate_dir_listing(struct connection *conn, const char *path) { } listing = make_apbuf(); - append(listing, "\n\n "); + append(listing, "<html>\n<head>\n<meta charset=\"utf-8\"/>\n<title>"); append(listing, conn->url); append(listing, "\n\n\n

"); append(listing, conn->url);