mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-26 13:50:33 -04:00
+ also compress js, css and everything with "text/***" mimetype
This commit is contained in:
parent
01e1ee9f44
commit
8121f83d61
@ -345,7 +345,7 @@ static int accessHandlerCallback(void *cls,
|
|||||||
contentLength = content.size();
|
contentLength = content.size();
|
||||||
|
|
||||||
/* Compress the content if necessary */
|
/* Compress the content if necessary */
|
||||||
if (acceptEncodingDeflate && mimeType.find("text/html") != string::npos) {
|
if (acceptEncodingDeflate && mimeType.find("text/") != string::npos) {
|
||||||
pthread_mutex_lock(&compressorLock);
|
pthread_mutex_lock(&compressorLock);
|
||||||
comprLen = COMPRESSOR_BUFFER_SIZE;
|
comprLen = COMPRESSOR_BUFFER_SIZE;
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ static int accessHandlerCallback(void *cls,
|
|||||||
httpResponseCode = MHD_HTTP_FOUND;
|
httpResponseCode = MHD_HTTP_FOUND;
|
||||||
} else {
|
} else {
|
||||||
/* Add if necessary the content-encoding */
|
/* Add if necessary the content-encoding */
|
||||||
if (acceptEncodingDeflate && mimeType.find("text/html") != string::npos) {
|
if (acceptEncodingDeflate && mimeType.find("text/") != string::npos) {
|
||||||
MHD_add_response_header(response, "Content-encoding", "deflate");
|
MHD_add_response_header(response, "Content-encoding", "deflate");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user