From 94c2ab4395bd6e4adca50a67a317cccb101ca1f3 Mon Sep 17 00:00:00 2001 From: Kelson Date: Sun, 17 May 2020 22:00:16 +0200 Subject: [PATCH] Add two OPDS related mime-types to compress for HTTP --- src/server/response.cpp | 2 ++ test/server.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/server/response.cpp b/src/server/response.cpp index 63ac7e273..cdd723a26 100644 --- a/src/server/response.cpp +++ b/src/server/response.cpp @@ -34,6 +34,8 @@ bool is_compressible_mime_type(const std::string& mimeType) { return mimeType.find("text/") != string::npos || mimeType.find("application/javascript") != string::npos + || mimeType.find("application/atom") != string::npos + || mimeType.find("application/opensearchdescription") != string::npos || mimeType.find("application/json") != string::npos; } diff --git a/test/server.cpp b/test/server.cpp index c43d0ed5c..1477806da 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -144,6 +144,10 @@ const ResourceCollection resources200Compressible{ { WITH_ETAG, "/skin/taskbar.css" }, { WITH_ETAG, "/skin/block_external.js" }, + { NO_ETAG, "/catalog/root.xml" }, + { NO_ETAG, "/catalog/searchdescription.xml" }, + { NO_ETAG, "/catalog/search" }, + { NO_ETAG, "/search?content=zimfile&pattern=abcd" }, { NO_ETAG, "/suggest?content=zimfile&term=ray" }, @@ -158,10 +162,6 @@ const ResourceCollection resources200Uncompressible{ { WITH_ETAG, "/skin/jquery-ui/images/animated-overlay.gif" }, { WITH_ETAG, "/skin/caret.png" }, - { NO_ETAG, "/catalog/root.xml" }, - { NO_ETAG, "/catalog/searchdescription.xml" }, - { NO_ETAG, "/catalog/search" }, - { WITH_ETAG, "/meta?content=zimfile&name=title" }, { WITH_ETAG, "/meta?content=zimfile&name=description" }, { WITH_ETAG, "/meta?content=zimfile&name=language" },