From b7d0407bdf63221cdcb0a302d273689434a1c4e7 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Fri, 19 Mar 2010 08:49:21 +0000 Subject: [PATCH] + small fix in the usage(9 --- src/server/kiwix-serve.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/kiwix-serve.cpp b/src/server/kiwix-serve.cpp index fbfe2e2..9dc89c1 100644 --- a/src/server/kiwix-serve.cpp +++ b/src/server/kiwix-serve.cpp @@ -241,6 +241,9 @@ static int accessHandlerCallback(void *cls, /* Specify the mime type */ MHD_add_response_header(response, "Content-Type", mimeType.c_str()); + /* Force to close the connection - cf. 100% CPU usage with v. 4.4 (in Lucid) */ + MHD_add_response_header(response, "Connection", "close"); + /* Queue the response */ int ret = MHD_queue_response(connection, MHD_HTTP_OK, @@ -302,7 +305,7 @@ int main(int argc, char **argv) { /* Print usage)) if necessary */ if (zimPath == "") { - cerr << "Usage: kiwix-serve [--index=ZIM_PATH] [--port=PORT] [--verbose] [--daemon] ZIM_PATH" << endl; + cerr << "Usage: kiwix-serve [--index=INDEX_PATH] [--port=PORT] [--verbose] [--daemon] ZIM_PATH" << endl; exit(1); }