From 9205377852b015044a31a4617b4c2b35b48bbdae Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 13 Jan 2016 19:46:31 +1100 Subject: [PATCH] I added utf-8 in your code: "Content-Type: text/html; charset=utf-8\r\n" (in few places) --- darkhttpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/darkhttpd.c b/darkhttpd.c index b8d4180..bcb4389 100644 --- a/darkhttpd.c +++ b/darkhttpd.c @@ -1393,7 +1393,7 @@ static void default_reply(struct connection *conn, "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", errcode, errname, date, server_hdr, keep_alive(conn), llu(conn->reply_length)); @@ -1432,7 +1432,7 @@ static void redirect(struct connection *conn, const char *format, ...) { "Location: %s\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, where, keep_alive(conn), llu(conn->reply_length)); @@ -1787,7 +1787,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));