diff options
Diffstat (limited to 'source/ui-shared.c')
| -rw-r--r-- | source/ui-shared.c | 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 4 insertions, 2 deletions
diff --git a/source/ui-shared.c b/source/ui-shared.c index c23e2e1..e5afb2e 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -1426,11 +1426,13 @@ void cgit_print_age(time_t t, int tz, time_t max_relative) /* * Whether a content type carries text a charset applies to, which is every - * text type and the XML ones, the atom feed among them. + * text type and the XML types of RFC 7303, the atom feed among them. */ static int type_has_charset(const char *mimetype) { - return starts_with(mimetype, "text/") || strstr(mimetype, "xml"); + return starts_with(mimetype, "text/") || + !strcmp(mimetype, "application/xml") || + ends_with(mimetype, "+xml"); } void cgit_print_http_headers(void) |
