diff --git a/src/server/kiwix-serve.cpp b/src/server/kiwix-serve.cpp index d865a34..8d6b922 100644 --- a/src/server/kiwix-serve.cpp +++ b/src/server/kiwix-serve.cpp @@ -27,9 +27,9 @@ #ifdef _WIN32 -#if (_MSC_VER < 1600) -#include "stdint4win.h" -#endif +#if (_MSC_VER < 1600) +#include "stdint4win.h" +#endif #include #include // otherwise socklen_t is not a recognized type //#include // otherwise int is not a recognized type @@ -274,7 +274,7 @@ static int accessHandlerCallback(void *cls, } else { if (isVerbose()) cout << "Failed to find " << urlStr << endl; - + content = "\nContent not found

Not Found

The requested URL " + urlStr + " was not found on this server.

"; mimeType = "text/html"; httpResponseCode = MHD_HTTP_NOT_FOUND; @@ -312,11 +312,11 @@ static int accessHandlerCallback(void *cls, contentLength = content.size(); /* Should be deflate */ - bool deflated = + bool deflated = contentLength > KIWIX_MIN_CONTENT_SIZE_TO_DEFLATE && contentLength < COMPRESSOR_BUFFER_SIZE && acceptEncodingDeflate && - mimeType.find("text/") != string::npos; + mimeType.find("text/") != string::npos; /* Compress the content if necessary */ if (deflated) { @@ -357,7 +357,7 @@ static int accessHandlerCallback(void *cls, if (deflated) { MHD_add_response_header(response, "Content-encoding", "deflate"); } - + /* Specify the mime type */ MHD_add_response_header(response, "Content-Type", mimeType.c_str()); } @@ -481,7 +481,7 @@ int main(int argc, char **argv) { cerr << "The XML library file '" << libraryPath << "' is empty (or has only remote books)." << endl; } } else { - if (!libraryManager.addBookFromPath(zimPath, zimPath, "", false)) { + if (!libraryManager.addBookFromPath(zimPath, zimPath, "","", false)) { cerr << "Unable to add the ZIM file '" << zimPath << "' to the internal library." << endl; exit(1); } else if (!indexPath.empty()) {