1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

AdBlock: Fixed domain match rules ||domain.com^

- it should also match something.domain.com
This commit is contained in:
nowrep 2012-07-02 01:40:32 +02:00
parent e06517bdd4
commit c73c9820e4
3 changed files with 5 additions and 4 deletions

View File

@ -195,7 +195,7 @@ bool AdBlockRule::networkMatch(const QNetworkRequest &request, const QString &do
matched = (m_regExp.indexIn(encodedUrl) != -1);
}
else if (m_useDomainMatch) {
matched = (domain == m_matchString);
matched = domain.contains(m_matchString);
}
else if (m_useEndsMatch) {
matched = encodedUrl.endsWith(m_matchString, m_caseSensitivity);

View File

@ -86,6 +86,7 @@ void NetworkManager::loadSettings()
cache->setMaximumCacheSize(settings.value("MaximumCacheSize", 50).toInt() * 1024 * 1024); //MegaBytes
setCache(cache);
}
m_doNotTrack = settings.value("DoNotTrack", false).toBool();
m_sendReferer = settings.value("SendReferer", true).toBool();
settings.endGroup();

View File

@ -60,13 +60,13 @@ QList<QNetworkProxy> NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &q
return systemProxyForQuery(query);
case NoProxy:
proxy.setType(QNetworkProxy::NoProxy);
proxy = QNetworkProxy::NoProxy;
break;
case DefinedProxy:
proxy.setType(m_proxyType);
proxy = m_proxyType;
if (m_useDifferentProxyForHttps && query.url().scheme() == "https") {
if (m_useDifferentProxyForHttps && query.protocolTag() == "https") {
proxy.setHostName(m_httpsHostName);
proxy.setPort(m_httpsPort);
proxy.setUser(m_httpsUsername);