diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2010-01-22 13:33:03 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-01-22 14:04:19 (GMT) |
commit | df01c399c0d9f3412c872ad9ccb7342af0a44ea2 (patch) | |
tree | 3abdf98f27b0406f8f3d0c04c53f05abcb717d21 /src/corelib | |
parent | c50788df123d848b8212376884376cc216c31015 (diff) | |
download | Qt-df01c399c0d9f3412c872ad9ccb7342af0a44ea2.zip Qt-df01c399c0d9f3412c872ad9ccb7342af0a44ea2.tar.gz Qt-df01c399c0d9f3412c872ad9ccb7342af0a44ea2.tar.bz2 |
Fix QUrl::toAce for domains with dot at end
Merge-request: 436
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qurl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index a131d6c..ba1110d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3241,8 +3241,11 @@ static QString qt_ACE_do(const QString &domain, AceOperation op) while (1) { int idx = nextDotDelimiter(domain, lastIdx); int labelLength = idx - lastIdx; - if (labelLength == 0) + if (labelLength == 0) { + if (idx == domain.length() && idx > 0) + break; return QString(); // two delimiters in a row -- empty label not allowed + } // RFC 3490 says, about the ToASCII operation: // 3. If the UseSTD3ASCIIRules flag is set, then perform these checks: |