[Kde-pim] Review Request: Avoid multiple calls to KMime::Contents::parse() in filters

Ingo Klöcker kloecker at kde.org
Wed Mar 7 22:16:16 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104090/#review11208
-----------------------------------------------------------

Ship it!


Since "From:" is a required header and is mostly present even in the worst non-standard-conform messages (in contrast to the only other required header, "Date:", which is missing very often) your patch appears to be an acceptable workaround.

- Ingo Klöcker


On Feb. 27, 2012, 2:47 a.m., Szymon Stefanek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104090/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2012, 2:47 a.m.)
> 
> 
> Review request for KDEPIM.
> 
> 
> Description
> -------
> 
> The search patterns in filters call the KMime::Contents::parse() method.
> When multiple filters are present the method is called multiple times.
> This is against the documented policy and ends up breaking the message
> headers (see bug 291171).
> 
> This patch avoids the call to parse() if headers are already accessible
> in the e-mail (that is, parse() has been already called).
> 
> 
> This addresses bug 291171.
>     http://bugs.kde.org/show_bug.cgi?id=291171
> 
> 
> Diffs
> -----
> 
>   mailcommon/searchpattern.cpp c637bf1 
> 
> Diff: http://git.reviewboard.kde.org/r/104090/diff/
> 
> 
> Testing
> -------
> 
> Compiled and tested locally. Fixes bug 291171.
> 
> 
> Thanks,
> 
> Szymon Stefanek
> 
>

_______________________________________________
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