[Kde-pim] Review Request: Improve parsing of Content-ID header
Thomas McGuire
mcguire at kde.org
Mon Jan 4 14:50:01 GMT 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2483/#review3568
-----------------------------------------------------------
branches/work/akonadi-ports/kdepimlibs/kmime/tests/kmime_message_test.cpp
<http://reviewboard.kde.org/r/2483/#comment2831>
Which mail client produces this invalid content id header?
I know KMail did, for a long time, but we fixed that eventually in trunk. Right?
- Thomas
On 2010-01-04 06:30:34, Torgny Nyblom wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2483/
> -----------------------------------------------------------
>
> (Updated 2010-01-04 06:30:34)
>
>
> Review request for KDE PIM.
>
>
> Summary
> -------
>
> Add the parse() and to7BitString() functions to ContentID class.
> The reason being that altho Content-Id should obey they same rules as Message-Id (localpart at hostpart) in practice it doesn't.
>
> The added parse() function tries to use the same algorithm as is used for MessageID but if that fails a debug message is issued and a more relaxed algorithm is used (parseAtom, might not be the best alternative but it works for the test email I've got).
>
> The added as7BitString() function is also almost the same as in the base class. The difference being that the enclosing '<' and '>' are not returned and if the relaxed parse() function was used to extract the header the domain part is not present and in that case the trailing '@' is discarded before returning,
>
>
> Diffs
> -----
>
> branches/work/akonadi-ports/kdepimlibs/kmime/kmime_headers.h 1068282
> branches/work/akonadi-ports/kdepimlibs/kmime/kmime_headers.cpp 1068282
> branches/work/akonadi-ports/kdepimlibs/kmime/kmime_headers_p.h 1068282
> branches/work/akonadi-ports/kdepimlibs/kmime/tests/kmime_message_test.h 1068282
> branches/work/akonadi-ports/kdepimlibs/kmime/tests/kmime_message_test.cpp 1068282
>
> Diff: http://reviewboard.kde.org/r/2483/diff
>
>
> Testing
> -------
>
> Old unittest works, new unittest for the added functions work.
> KMail seem to get the expected values back.
>
>
> Thanks,
>
> Torgny
>
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list