[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Mail headers: advice needed.
From:       Rik Hemsley <rik () rikkus ! demon ! co ! uk>
Date:       1999-06-19 8:32:29
[Download RAW message or body]


On 18-Jun-99 Roberto Alsina wrote:
>> * Message comes in with greater than n references
>> 
>> Create In-Reply-To, remove the second reference until less than n
>> references,
>> append to references
>> 
>> (n == 2 for example)
>> 
>> ------------ first message ---------
>> Message-ID: <xxx@kde.org>
>> References: <aaa@kde.org> <bbb@kde.org> <ccc@kde.org>
>> ------------------------------------
>> 
>> --------------- reply -------------
>> Message-ID: <yyy@kde.org>
>> In-Reply-To: <xxx@kde.org>
>> References: <aaa@kde.org> <ccc@kde.org> <xxx@kde.org>
>> -----------------------------------
>> 
>> Anything I didn't cover ? ;)
> 
> Why the second reference and not the first?
> Am I missing a RFC somewhere, or is it tradition?

You keep the first reference. It's just tradition. You can not bother and just
remove from the front if you like.

BTW for krn, kmail etc: If you want an easy way to tokenise the References
header into strings, rip RToken out of empath/rmm/ and use it.

QStrList l;
RTokenise(referencesString, " ", l);

while (l.count() >= maxRefs)
    l.removeFirst();

l.append(messageIdOfMessageWeAreReplyingTo);

You now have what you're looking for. To keep the first ref, you just change
removeFirst() to remove(1);

Note that RTokenise handles quoted strings and comments, so is safe, and it
pointer walks, so it's fast.

Cheers,
Rik


--
KDE - Colour outside the lines  : http://www.kde.org
[[without]] - software for KDE  : http://without.netpedia.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic