At 16:43 +0900 04/11/2009, Stephen J. Turnbull wrote: >Barry Warsaw writes: > > > So I'm just starting to read RFC 5322 and I'm starting by skimming > > over Appendix A (differences between RFC 5322 and 2822). > >I know Barry's a big supporter of the Postel Principle. As a >guideline[1], how far back should we be lenient? RFC 822 (no leading "2" >;-)?
Sure. The header field should be parsed, if possible, and possibly add a defect to the message. For some header fields, the data should be added to the previous Header instance; for others, an extra Header instance might need to be created. Message /generation/ should comply with what was in RFC 2822, where this requirement was added, and also the new RFC 5322. >Footnotes: >[1] Presumably over time we'll accrete definitely non-conforming >practices that we need to accept and do something sane with (eg, we >can't just raise ArmageddonException because we get a header with >8-bit characters in it). But I think we also should have a plan for >formerly acceptable syntax that has been restricted in more recent >RFCs, etc. Any email parser must cope with both obsolete-* syntax and common bad practices. Python's already does in various places. -- ____________________________________________________________________ TonyN.:' <mailto:[email protected]> ' <http://www.georgeanelson.com/> _______________________________________________ Email-SIG mailing list [email protected] Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com
