From 581362a43a05b217be745c10a653b56b6507c962 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Tue, 12 Feb 2013 18:55:09 +0000 Subject: [PATCH] * FIXED: kiwix-serve crahs if really long URL (#400) --- src/server/kiwix-serve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/kiwix-serve.cpp b/src/server/kiwix-serve.cpp index 5209286..3df0eeb 100644 --- a/src/server/kiwix-serve.cpp +++ b/src/server/kiwix-serve.cpp @@ -211,6 +211,7 @@ static int accessHandlerCallback(void *cls, /* Display the search restults */ else if (!strcmp(url, "/search")) { + /* Retrieve the pattern to search */ const char* pattern = MHD_lookup_connection_value(connection, MHD_GET_ARGUMENT_KIND, "pattern"); if (pattern == NULL) @@ -264,7 +265,6 @@ static int accessHandlerCallback(void *cls, pthread_mutex_lock(&readerLock); try { found = reader->getContentByUrl(urlStr, content, contentLength, mimeType); - if (found) { if (isVerbose()) { cout << "Found " << urlStr << endl;