diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-09-15 13:49:41 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-09-16 13:11:29 +0300 |
commit | 366e557e1cc96a7f9b12c10f28f088d2ef4712cb (patch) | |
tree | e90cd74ca6f586c21fb13a819194022b0b3f677a /melib/src | |
parent | 9b0180fdbc76fded5c935bcf60a1fa034327d9ef (diff) |
melib/email: don't do case sensitive eq for mime parameters
Diffstat (limited to 'melib/src')
-rw-r--r-- | melib/src/email.rs | 2 | ||||
-rw-r--r-- | melib/src/email/attachments.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/melib/src/email.rs b/melib/src/email.rs index fd72f521..89cc1375 100644 --- a/melib/src/email.rs +++ b/melib/src/email.rs @@ -280,7 +280,7 @@ impl Envelope { builder.set_content_type_from_bytes(value); let mut boundary = None; for (n, v) in params { - if n == b"boundary" { + if n.eq_ignore_ascii_case(b"boundary") { boundary = Some(v); break; } diff --git a/melib/src/email/attachments.rs b/melib/src/email/attachments.rs index e7d95906..f286ccbe 100644 --- a/melib/src/email/attachments.rs +++ b/melib/src/email/attachments.rs @@ -390,7 +390,7 @@ impl fmt::Display for Attachment { let name = String::from_utf8_lossy( parameters .iter() - .find(|(name, _)| name == b"name") + .find(|(name, _)| name.eq_ignore_ascii_case(b"name")) .map(|(_, value)| value) .unwrap(), ); |