aboutsummaryrefslogtreecommitdiff
path: root/m2.c
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2023-03-14 23:03:16 -0700
committerTrumeet <yuuta@yuuta.moe>2023-03-14 23:03:16 -0700
commitd8ea3e32fec25638da4bbb05bc826ece46652f4d (patch)
tree724441bc0b442af63b39ffd8b92ae42dad8941e1 /m2.c
parent8284efa946b0e37c91de7fdecf1d3a2aff6e4059 (diff)
downloadhitokoto-master.tar
hitokoto-master.tar.gz
hitokoto-master.tar.bz2
hitokoto-master.zip
Add charset in headerHEADmaster
Diffstat (limited to 'm2.c')
-rw-r--r--m2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/m2.c b/m2.c
index cb83d91..4596e1e 100644
--- a/m2.c
+++ b/m2.c
@@ -66,7 +66,7 @@ int main(int argc, char **argv) {
char *text_zh = (char *) sqlite3_column_text(stmt, 3);
if (!strncmp(url, "/hitokoto.css", 13)) {
FCGX_FPrintF(out,
- "Content-Type: text/css\r\n"
+ "Content-Type: text/css; charset=utf-8\r\n"
"\r\n"
"#hitokoto::before { content: \"%s\" }\n"
"#hitokoto::after { content: \"%s\" }\n"
@@ -76,7 +76,7 @@ int main(int argc, char **argv) {
text_zh ? text_zh : "", title_zh ? title_zh : "");
} else {
FCGX_FPrintF(out,
- "Content-type: application/json\r\n"
+ "Content-type: application/json; charset=utf-8\r\n"
"\r\n"
"{\"title\":\"%s\",\"title_zh\":\"%s\",\"text\":\"%s\",\"text_zh\":\"%s\"}\n",
title,