[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise4/kdepimlibs
From: Thomas McGuire <mcguire () kde ! org>
Date: 2009-10-09 21:47:12
Message-ID: 1255124832.203882.14345.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1033323 by tmcguire:
Merged revisions 1031598 via svnmerge from
svn+ssh://tmcguire@svn.kde.org/home/kde/branches/KDE/4.3/kdepimlibs
........
r1031598 | tnyblom | 2009-10-05 15:44:58 +0200 (Mon, 05 Oct 2009) | 7 lines
Backport r1028946 by tnyblom from trunk to the 4.3 branch:
This makes KMime allow a trailing dot in domain names as per the RFC.
CCBUG: 139477
........
_M . (directory)
M +5 -0 kmime/kmime_header_parsing.cpp
M +22 -0 kmime/tests/headertest.cpp
** branches/kdepim/enterprise4/kdepimlibs #property svnmerge-integrated
- /branches/KDE/4.3/kdepimlibs:1-986158,990023,990532,990575,990631,990684,991932,9 \
96755,997101,997490,998251,1000615,1007460,1008037,1008812,1009437,1011841,1013328-101 \
3331,1013810,1015198,1015975-1016224,1016226-1016229,1019800,1021325,1024435,1026793 \
+ /branches/KDE/4.3/kdepimlibs:1-986158,990023,990532,990575,990631,990684,991932,9967 \
55,997101,997490,998251,1000615,1007460,1008037,1008812,1009437,1011841,1013328-101333 \
1,1013810,1015198,1015975-1016224,1016226-1016229,1019800,1021325,1024435,1026793,1031598
--- branches/kdepim/enterprise4/kdepimlibs/kmime/kmime_header_parsing.cpp \
#1033322:1033323 @@ -916,6 +916,11 @@
QString maybeDotAtom;
if ( parseDotAtom( scursor, send, maybeDotAtom, isCRLF ) ) {
result = maybeDotAtom;
+ // Domain may end with '.', if so preserve it'
+ if ( scursor != send && *scursor == '.' ) {
+ result += QChar('.');
+ scursor++;
+ }
return true;
}
}
--- branches/kdepim/enterprise4/kdepimlibs/kmime/tests/headertest.cpp \
#1033322:1033323 @@ -228,6 +228,28 @@
QCOMPARE( h->mailboxes().count(), 1 );
QCOMPARE( h->asUnicodeString(), QString::fromUtf8( "Ingo \
=?iso-8859-15?q?Kl=F6cker?= <kloecker@kde.org>" ) ); delete h;
+
+ // based on bug #139477, trailing '.' in domain name (RFC 3696, section 2 - \
http://tools.ietf.org/html/rfc3696#page-4) + h = new \
Headers::Generics::AddressList(); + h->from7BitString( "joe@where.test." );
+ QVERIFY( !h->isEmpty() );
+ QCOMPARE( h->addresses().count(), 1 );
+ QCOMPARE( h->addresses().first(), QByteArray("joe@where.test.") );
+ QCOMPARE( h->displayNames().count(), 1 );
+ QCOMPARE( h->displayNames().first(), QString() );
+ QCOMPARE( h->prettyAddresses().count(), 1 );
+ QCOMPARE( h->prettyAddresses().first(), QString("joe@where.test.") );
+ delete h;
+
+ h = new Headers::Generics::AddressList();
+ h->from7BitString( "Mary Smith <mary@x.test>, jdoe@example.org., Who? \
<one@y.test>" ); + QCOMPARE( h->addresses().count(), 3 );
+ names = h->displayNames();
+ QCOMPARE( names.takeFirst(), QString("Mary Smith") );
+ QCOMPARE( names.takeFirst(), QString() );
+ QCOMPARE( names.takeFirst(), QString("Who?") );
+ QCOMPARE( h->as7BitString( false ), QByteArray("Mary Smith <mary@x.test>, \
jdoe@example.org., Who? <one@y.test>") ); + delete h;
}
void HeaderTest::testMailboxListHeader()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic