summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Sivonen <hsivonen@hsivonen.fi>2018-11-17 20:46:15 +0200
committerKartikaya Gupta (kats) <staktrace@users.noreply.github.com>2019-05-23 21:40:49 -0400
commit5f051defdafe6f4c43771fdb16765004035b8bf1 (patch)
tree60cc46830087896c798ae12df84e4c89e6dd7327
parent8d410d9af3db7f8ddf0634bb65d1a6aa96f31e10 (diff)
downloadmailparse-5f051defdafe6f4c43771fdb16765004035b8bf1.tar.gz
mailparse-5f051defdafe6f4c43771fdb16765004035b8bf1.tar.xz
Test UTF-7 in headers
-rw-r--r--src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index a42dae9..55d0f4f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -961,6 +961,14 @@ mod tests {
"\u{65E5}\u{672C}\u{8A9E}"
);
+ let (parsed, _) = parse_header(b"Subject: =?UTF-7?Q?+JgM-?=")
+ .unwrap();
+ assert_eq!(parsed.get_key().unwrap(), "Subject");
+ assert_eq!(
+ parsed.get_value().unwrap(),
+ "\u{2603}"
+ );
+
let (parsed, _) = parse_header(
b"Content-Type: image/jpeg; name=\"=?UTF-8?B?MDY2MTM5ODEuanBn?=\"",
).unwrap();