Re: [Mutt] #3090: Mutt removes In-Reply-To header field
#3090: Mutt removes In-Reply-To header field
Comment (by Aron Griffis):
{{{
I've been thinking about another fix for this problem. Presently
references and in-reply-to are stored in struct envelope as LIST.
This is based on the assumption that the headers can be reliably
parsed and the original text regenerated, but that assumption is
false because the original headers aren't strictly bound to
a particular format.
So rather than try to settle on a more correct parser, I think
both forms should be stored. The original in-reply-to and
references should be stored in struct envelope as a char * just
like subject (and for that matter, just like message_id). The
parsed lines can be stored alongside the strings in a LIST for
the sake of threading.
There are situations where it would still be appropriate to throw
away the string and rely entirely on the list, for example when
linking or breaking threads. In that case, the string can be
thrown away and regenerated as necessary. Possibly there should
be a couple functions to abstract this for convenience... (keep
in mind this is just brainstorming)
references_list(env) -- returns env->references_l if non-null,
otherwise parses env->references_s and caches the result in
env->references_l
references_string(env) -- returns env->references_s if non-null,
otherwise generates from env->references_l and caches the result
in env->references_s
and similar for in_reply_to.
}}}
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3090#comment:>