Compression of xml files
This commit is contained in:
@ -69,7 +69,9 @@ int cache_process() {
|
|||||||
cache[i].is_updating = 1;
|
cache[i].is_updating = 1;
|
||||||
SHA1_Init(&ctx);
|
SHA1_Init(&ctx);
|
||||||
file = fopen(cache[i].filename, "rb");
|
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;
|
int level = NECRONDA_ZLIB_LEVEL;
|
||||||
z_stream strm;
|
z_stream strm;
|
||||||
|
Reference in New Issue
Block a user