mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 03:52:35 -04:00
+better support of json
This commit is contained in:
parent
838bb06204
commit
a46e905be9
@ -265,7 +265,7 @@ static int accessHandlerCallback(void *cls,
|
||||
|
||||
content += (suggestionCount == 0 ? "" : ",");
|
||||
content += "{\"value\":\"" + std::string(term) + " \", \"label\":\"containing '" + std::string(term) + "'...\"}]";
|
||||
mimeType = "text/x-json; charset=utf-8";
|
||||
mimeType = "application/json; charset=utf-8";
|
||||
}
|
||||
|
||||
/* Get static skin stuff */
|
||||
@ -399,7 +399,9 @@ static int accessHandlerCallback(void *cls,
|
||||
contentLength > KIWIX_MIN_CONTENT_SIZE_TO_DEFLATE &&
|
||||
contentLength < COMPRESSOR_BUFFER_SIZE &&
|
||||
acceptEncodingDeflate &&
|
||||
( mimeType.find("text/") != string::npos || mimeType == "application/javascript" );
|
||||
( mimeType.find("text/") != string::npos ||
|
||||
mimeType.find("application/javascript") != string::npos ||
|
||||
mimeType.find("application/json") != string::npos );
|
||||
|
||||
/* Compress the content if necessary */
|
||||
if (deflated) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user