Hi,
Show quoted text> Plus so far as I see some of your test vectors are wrong. For instance
Yes, I think some are, and as I wrote a long time ago, I'd be happy to fix
those if there is any chance that the fix will actually get merged.
Show quoted text> "=?us-ascii?q?foo?=\r\n bar" => "foo bar"
>
> Should be "foobar", not "foo bar". That is a single line when decoded and in such cases the leading white spaces immediately after CRLF is ignored.
That one is actually correct.
Could you point to where in the relevant RFCs you think the behavior you
suggest is specified?
You might want to start reading at sections 2.2.3 and 3.2.2 of RFC 5322,
the former of which this quote is from:
| The process of moving from this folded multiple-line representation
| of a header field to its single line representation is called
| "unfolding". Unfolding is accomplished by simply removing any CRLF
| that is immediately followed by WSP. Each header field should be
| treated in its unfolded form for further syntactic and semantic
| evaluation. An unfolded header field has no length restriction and
| therefore may be indeterminately long.
Regards, Florian