commit 8ab2d60eb386034aa824bf8fc038d3a2ee2b5f79 from: Omar Polo date: Wed Sep 14 20:36:42 2022 UTC fix utf8 spelling, apparently utf-8 is preferred commit - 27a9ee843808a86e6383ab119c3aac64eed8a9e6 commit + 8ab2d60eb386034aa824bf8fc038d3a2ee2b5f79 blob - 4ace427cc00a1d7ce2a1d0c3e4d4cfebd9fa7897 blob + f12456e243f5d39e203757322e1cf5cb32616265 --- proxy.c +++ proxy.c @@ -585,6 +585,7 @@ parse_mime(struct client *clt, char *mime, char *lang, if (!strncmp(t, "charset=", 8)) { t += 8; if (!strncasecmp(t, "utf8", 4) || + !strncasecmp(t, "utf-8", 5) || !strncasecmp(t, "ascii", 5)) { log_debug("unknown charset %s", t); return (-1); @@ -654,7 +655,7 @@ proxy_read(struct bufferevent *bev, void *d) if (clt_puts(clt, "Status: 501\r\n") == -1) goto err; if (clt_puts(clt, - "Content-Type: text/plain;charset=utf8\r\n") == -1) + "Content-Type: text/plain;charset=utf-8\r\n") == -1) goto err; if (clt_puts(clt, "\r\n") == -1) goto err; @@ -672,7 +673,7 @@ proxy_read(struct bufferevent *bev, void *d) if (clt_puts(clt, "Status: 501\r\n") == -1) goto err; if (clt_puts(clt, - "Content-Type: text/plain;charset=utf8\r\n") == -1) + "Content-Type: text/plain;charset=utf-8\r\n") == -1) goto err; if (clt_puts(clt, "\r\n") == -1) goto err; @@ -683,7 +684,7 @@ proxy_read(struct bufferevent *bev, void *d) } if (clt->clt_translate) - ctype = "text/html;charset=utf8"; + ctype = "text/html;charset=utf-8"; else ctype = mime;