diff options
Diffstat (limited to 'src/corelib/io/qtldurl.cpp')
-rw-r--r-- | src/corelib/io/qtldurl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/io/qtldurl.cpp b/src/corelib/io/qtldurl.cpp index 912609ec91..fc3e16b241 100644 --- a/src/corelib/io/qtldurl.cpp +++ b/src/corelib/io/qtldurl.cpp @@ -125,10 +125,10 @@ Q_CORE_EXPORT bool qIsEffectiveTLD(const QStringRef &domain) return true; const int dot = domain.indexOf(QLatin1Char('.')); - if (dot >= 0) { - if (containsTLDEntry(domain.mid(dot), SuffixMatch)) // 2 - return !containsTLDEntry(domain, ExceptionMatch); // 3 - } + if (dot < 0) // Actual TLD: may be effective if the subject of a wildcard rule: + return containsTLDEntry(QString(QLatin1Char('.') + domain), SuffixMatch); + if (containsTLDEntry(domain.mid(dot), SuffixMatch)) // 2 + return !containsTLDEntry(domain, ExceptionMatch); // 3 return false; } |