Browse Source

melib/email: don't do case sensitive eq for mime parameters

memfd
Manos Pitsidianakis 1 year ago
parent
commit
366e557e1c
Signed by untrusted user: epilys GPG Key ID: 73627C2F690DF710
  1. 2
      melib/src/email.rs
  2. 2
      melib/src/email/attachments.rs

2
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;
}

2
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(),
);

Loading…
Cancel
Save