Open jugglerchris opened 8 years ago
If this is a blocker for anyone, you can get around it with the following:
fn get_header_case_insensitive<'a>(mime_message: &'a MimeMessage, target_header: &str) -> Option<&'a email::Header> {
mime_message.headers.iter().find(|header| header.name.to_lowercase() == target_header.to_lowercase())
}
I think
HeaderMap::get
should be case insensitive, egheaders.get("Content-Transfer-Encoding")
should still work if the actual header is spelled "Content-transfer-encoding". I guess I would go forordered_headers
having the original case and theheaders
HashMap storing lower-cased keys (translating whenever it's used).