diff --git a/src/minisatip.c b/src/minisatip.c index 90540df60e..5322138b4f 100644 --- a/src/minisatip.c +++ b/src/minisatip.c @@ -1583,7 +1583,7 @@ int read_http(sockets *s) { int len = get_json_state(buf, JSON_STATE_MAXLEN, sbuf, JSON_STRING_MAXLEN); http_response(s, 200, - "Content-Type: application/json\r\n" + "Content-Type: application/json; charset=utf-8\r\n" "Connection: close\r\n" "Access-Control-Allow-Origin: *", buf, 0, len); @@ -1596,7 +1596,7 @@ int read_http(sockets *s) { char *buf = _malloc(JSON_BANDWIDTH_MAXLEN); int len = get_json_bandwidth(buf, JSON_BANDWIDTH_MAXLEN); http_response(s, 200, - "Content-Type: application/json\r\n" + "Content-Type: application/json; charset=utf-8\r\n" "Connection: close\r\n" "Access-Control-Allow-Origin: *", buf, 0, len); diff --git a/src/utils.c b/src/utils.c index 0cd139f7aa..ba703d5608 100644 --- a/src/utils.c +++ b/src/utils.c @@ -489,12 +489,12 @@ char *readfile(char *fn, char *ctype, int *len) { "text/javascript\r\nConnection: close"); else if (endswith(fn, "htm") || endswith(fn, "html")) strcpy(ctype, "Cache-Control: max-age=3600\r\nContent-type: " - "text/html\r\nConnection: close"); + "text/html; charset=utf-8\r\nConnection: close"); else if (endswith(fn, "xml")) strcpy(ctype, "Cache-Control: no-cache\r\nContent-type: text/xml"); else if (endswith(fn, "json")) strcpy(ctype, "Cache-Control: no-cache\r\nContent-type: " - "application/json"); + "application/json; charset=utf-8"); else if (endswith(fn, "m3u")) strcpy(ctype, "Cache-Control: no-cache\r\nContent-type: video/x-mpegurl");