summaryrefslogtreecommitdiff
path: root/src/adblock
diff options
context:
space:
mode:
Diffstat (limited to 'src/adblock')
-rw-r--r--src/adblock/adblockrulefallbackimpl.cpp7
-rw-r--r--src/adblock/adblockruletextmatchimpl.cpp5
2 files changed, 3 insertions, 9 deletions
diff --git a/src/adblock/adblockrulefallbackimpl.cpp b/src/adblock/adblockrulefallbackimpl.cpp
index 7b18feec..36aabc30 100644
--- a/src/adblock/adblockrulefallbackimpl.cpp
+++ b/src/adblock/adblockrulefallbackimpl.cpp
@@ -23,6 +23,7 @@
*
* ============================================================ */
+
// Self Includes
#include "adblockrulefallbackimpl.h"
@@ -92,16 +93,12 @@ AdBlockRuleFallbackImpl::AdBlockRuleFallbackImpl(const QString &filter)
bool AdBlockRuleFallbackImpl::match(const QNetworkRequest &request, const QString &encodedUrl, const QString &) const
{
- if (!request.hasRawHeader("referer"))
- return false;
-
if (m_thirdPartyOption)
{
const QString referer = request.rawHeader("referer");
const QString host = request.url().host();
- bool isThirdParty = !referer.contains(host);
- if (!isThirdParty)
+ if (referer.contains(host)) // is NOT third party
return false;
}
diff --git a/src/adblock/adblockruletextmatchimpl.cpp b/src/adblock/adblockruletextmatchimpl.cpp
index 7b55bf27..fd901e9c 100644
--- a/src/adblock/adblockruletextmatchimpl.cpp
+++ b/src/adblock/adblockruletextmatchimpl.cpp
@@ -46,10 +46,7 @@ AdBlockRuleTextMatchImpl::AdBlockRuleTextMatchImpl(const QString &filter)
bool AdBlockRuleTextMatchImpl::match(const QNetworkRequest &request, const QString &encodedUrl, const QString &encodedUrlLowerCase) const
{
- // this basically lets the "first request" to pass...
- if (!request.hasRawHeader("referer"))
- return false;
-
+ Q_UNUSED(request);
Q_UNUSED(encodedUrl);
// Case sensitive compare is faster, but would be incorrect with encodedUrl since
// we do want case insensitive.