summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurlidna.cpp
diff options
context:
space:
mode:
authorDavid Faure <faure+bluesystems@kde.org>2013-07-01 15:12:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-01 17:04:20 +0200
commit170469ef84fd7ce7805ff174aed5b3447fa8e7a2 (patch)
treeabe68e0f1309d7c68c10bafba60e8bea4d46be7c /src/corelib/io/qurlidna.cpp
parent539f90e9719998e57f17086178eeccdf34f19465 (diff)
Fix QUrl::topLevelDomain(QUrl::FullyDecoded)
qt_ACE_do(".co.uk") was returning an empty string because of the leading dot. This has always caused issues in KDE code too, where ACE normalization needs the dot removed, and re-added afterwards. Change-Id: Id9fcea0333cf55c14d755a86d4bf33a50f194429 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/corelib/io/qurlidna.cpp')
-rw-r--r--src/corelib/io/qurlidna.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp
index 70db9e09eb..619ab589a4 100644
--- a/src/corelib/io/qurlidna.cpp
+++ b/src/corelib/io/qurlidna.cpp
@@ -2479,7 +2479,8 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
if (labelLength == 0) {
if (idx == domain.length())
break;
- return QString(); // two delimiters in a row -- empty label not allowed
+ if (idx > 0)
+ return QString(); // two delimiters in a row -- empty label not allowed
}
// RFC 3490 says, about the ToASCII operation: