[Imap-protocol] significance of leading whitespace in RFC 2822 unstructured headers

Bill Shannon <[email protected]>
Newsgroups gmane.mail.imap.general
Message-ID <[email protected]>
(Maybe there's an RFC 2822 experts list that would be more appropriate
for this question?  If so, please point me in the right direction.)

According to the RFC 2822 syntax, any whitespace after the colon in
an unstructured header is part of the value of that header.
This means that in the header

Subject: test

The value of the subject header is " test" with a leading space.

I suspect the UW IMAP server is not alone in returning "test" as the
subject for such a message.

Similarly for the Content-Description header.

(A quick test shows that the UW IMAP server preserves trailing whitespace
but not leading whitespace in Subject and Content-Description headers.)

Am I misinterpreting the RFC 2822 spec?  I'd really like that leading whitespace
to be insignificant, and I suspect that's the way most people and software
treat it, but I can't see where the spec says that.

This is an issue because an OASIS security spec says that all whitespace
in unstructured headers must be preserved, and factors into the digital
signature of the message.

Thanks.
_______________________________________________
Imap-protocol mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-protocol
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.