From d88c70c9786ed1298dc45a924ad0fcf60d42d0f1 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 24 Dec 2020 23:53:14 +0100 Subject: [PATCH] Compression of xml files --- src/cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cache.c b/src/cache.c index 7107427..c378857 100644 --- a/src/cache.c +++ b/src/cache.c @@ -69,7 +69,9 @@ int cache_process() { cache[i].is_updating = 1; SHA1_Init(&ctx); file = fopen(cache[i].filename, "rb"); - compress = strncmp(cache[i].meta.type, "text/", 5) == 0; + compress = strncmp(cache[i].meta.type, "text/", 5) == 0 || + (strncmp(cache[i].meta.type, "application/", 12) == 0 && + strstr(cache[i].meta.type, "+xml") != NULL); int level = NECRONDA_ZLIB_LEVEL; z_stream strm;