[Top] [All Lists]

Re: "Header Reordering", yet again

2005-05-27 11:50:11

On Fri, 27 May 2005 09:31:37 -0700 (PDT), <ned+ietf-smtp(_at_)mrochek(_dot_)com> wrote:

This could even result in reordering of trace fields in some cases, especially if clocks are out of sync (which they often are). The mapping of trace fields
to X.400 in particular is pretty complicated.

So, why not have some explicit ordering of any new trace fields, rather than relying in their order in the header

For instance, put a sequence number in the header data, and whenever you add a trace header, add one onto the sequence number. (Yes, I appreciate this may make it harder to add them, but if the ordering doesn't then matter, you could add the new trace headers at the end of the header after you've seen all the other header lines so you know what sequence number you should use)


Trace-Header: 3, trace data 10:30 +0000
From: sender(_at_)domain(_dot_)com
Trace-Header: 1, trace data 10:00 +0000
Subject: my subject
Trace-Header: 2, trace data 10:15 +0000

You could still put the trace headers in the right order whatever re-ordering of headers is done by anything. It's only if something rewrites the headers, or puts the wrong sequence number on when adding a trace header that you'd have a problem - but if you rely on header ordering, then you're at the mercy of any program which sees the message at all, even ones which don't understand your new trace headers. Having explicit ordering, you're only at the mercy of programs which claim to understand and support your new headers.

Just a thought...