RFC2822 says, in section 2.2, that the header field value may only
be composed of characters in the US-ASCII range of 33 to 126 inclusive,
excluding a colon.
Clearly a header field that contains a space is illegal:
A B: foo <-- illegal
Sendmail interprets such a header as a non-header and interprets
it as the start of the body (even if legal headers follow). Qmail
accepts this header field as a header and includes it in its list
My question is not which behavior is correct. Rather I am confused
about section 3.4.2 (The "nowsp" canonicalization algorithm), which
states in bullet 2 that:
Map all header field names (not the header field contents) to
Unless this standard specifically prohibits illegal header field
names, someone, somewhere, sometime will try to canonify such
a header for inclusion in the hash and signature.
Because the standard does not make such a prohibition, I need
to know if SWSP in a header field name should be removed or retained
as part of its canonicalization under "nowsp".
Your feedback appreciated.