Use UTF-8 as the encoding for directory listing.
authorHugh Wang <hghwng@gmail.com>
Sun, 20 Dec 2015 14:49:14 +0000 (22:49 +0800)
committerEmil Mikulic <emikulic@gmail.com>
Wed, 13 Jan 2016 08:53:14 +0000 (19:53 +1100)
darkhttpd.c

index e7a1ec8..9f781f3 100644 (file)
@@ -1864,7 +1864,7 @@ static void generate_dir_listing(struct connection *conn, const char *path) {
      "Accept-Ranges: bytes\r\n"
      "%s" /* keep-alive */
      "Content-Length: %llu\r\n"
-     "Content-Type: text/html\r\n"
+     "Content-Type: text/html; charset=UTF-8\r\n"
      "\r\n",
      date, server_hdr, keep_alive(conn), llu(conn->reply_length));