mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
optimize log message with block request.
This commit is contained in:
parent
eaf76fbcb6
commit
ac7a70cea1
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue