From da663b426b7e19ffe9af065748df92a2795a88b6 Mon Sep 17 00:00:00 2001 From: Konstantin Isakov Date: Thu, 9 Apr 2009 11:35:45 +0000 Subject: [PATCH] +! Require "word" parameter to be passed to gdlookup:// requests, thus skipping some erroneous empty requests from underparsed wikipedia articles. --- src/article_netmgr.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/article_netmgr.cc b/src/article_netmgr.cc index 0347d149..b827c0ae 100644 --- a/src/article_netmgr.cc +++ b/src/article_netmgr.cc @@ -51,9 +51,10 @@ sptr< Dictionary::DataRequest > ArticleNetworkAccessManager::getResource( contentType = "text/html"; - return ( url.queryItemValue( "notfound" ) != "1" ) ? - articleMaker.makeDefinitionFor( word, group ) : - articleMaker.makeNotFoundTextFor( word, group ); + if ( word.size() ) // Require word to be passed + return ( url.queryItemValue( "notfound" ) != "1" ) ? + articleMaker.makeDefinitionFor( word, group ) : + articleMaker.makeNotFoundTextFor( word, group ); } if ( ( url.scheme() == "bres" || url.scheme() == "gdau" ) &&