From ac7a70cea153976ccb9387bb8cf239bbc4463d9e Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Wed, 20 Apr 2022 00:40:41 +0800 Subject: [PATCH] optimize log message with block request. --- article_netmgr.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/article_netmgr.cc b/article_netmgr.cc index 26cbed38..b39a3eeb 100644 --- a/article_netmgr.cc +++ b/article_netmgr.cc @@ -194,7 +194,7 @@ QNetworkReply * ArticleNetworkAccessManager::createRequest( Operation op, //if not external url,can be blocked from here. no need to continue execute the following code. //such as bres://upload.wikimedia.... etc . if (!Utils::isExternalLink(req.url())) { - gdWarning( "Blocking element \"%s\"\n", req.url().toEncoded().data() ); + gdWarning( "Blocking element \"%s\" as built-in link ", req.url().toEncoded().data() ); return new BlockedNetworkReply( this ); } @@ -215,7 +215,7 @@ QNetworkReply * ArticleNetworkAccessManager::createRequest( Operation op, if ( !req.url().host().endsWith( refererUrl.host() ) && getHostBase( req.url() ) != getHostBase( refererUrl ) && !req.url().scheme().startsWith("data") ) { - gdWarning( "Blocking element \"%s\"\n", req.url().toEncoded().data() ); + gdWarning( "Blocking element \"%s\" due to not same domain", req.url().toEncoded().data() ); return new BlockedNetworkReply( this ); }