diff options
author | Bruce Guenter <bruce@untroubled.org> | 2016-11-11 08:12:42 -0600 |
---|---|---|
committer | staktrace <accounts.github@staktrace.com> | 2016-11-11 11:32:53 -0500 |
commit | e4f54f9af1685095a42d00a66f7a09db2f9eef37 (patch) | |
tree | 17e56cead98909ef003686ee05103535d40e6e31 /target/doc/mailparse/trait.MailHeaderMap.html | |
parent | ef6816e494c581ff670d30ab1dba2163c26ebf0b (diff) |
Make MailHeaderMap perform case-insensitive searches
The trait MailHeaderMap has two methods for searching headers, normal
and case-insensitive. This documentation says:
> According to the spec the mail headers are supposed to be
> case-sensitive, but in real-world scenarios that's not always the
> case.
Actually, the spec says nothing that headers supposed to case-sensitive,
and historical precedent is to be case-insensitive. Certainly, all the
mail processing software I am familiar with (Thunderbird, qmail, ezmlm,
and mutt) treat headers as case insensitive. RFC 822 section 3.4.7 says:
> When matching any other syntactic unit, case is to be ignored. For
> example, the field-names "From", "FROM", "from", and even "FroM" are
> semantically equal and should all be treated identically.
While RFC 2822 did drop that section (and RFC 5322 didn't restore it),
others interpret other parts to indicate case insensitivity.
https://stackoverflow.com/a/6143644
> RFC 5322 does actually specify this, but it is very indirect.
https://www.gnu.org/software/emacs/manual/html_node/emacs/Mail-Headers.html
> Upper and lower case are equivalent in field names.
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.email.ExtractEmailHeaders/index.html
> NOTE the header key is case insensitive
This change makes all header searches case insensitive.
Diffstat (limited to 'target/doc/mailparse/trait.MailHeaderMap.html')
0 files changed, 0 insertions, 0 deletions