From 345b3300177e9340f33971fd46a2b6470c19f5d8 Mon Sep 17 00:00:00 2001 From: Mauro D Date: Thu, 28 Oct 2021 15:39:48 +0000 Subject: [PATCH] Some bug fixing. All tests passing. --- src/decoders/html.rs | 13 +- src/parsers/message.rs | 75 +- src/parsers/message_stream.rs | 52 +- tests/html/001.html | 560 --------------- tests/html/002.html | 1249 --------------------------------- tests/legacy/000.txt | 12 +- tests/legacy/001.txt | 12 +- tests/legacy/002.txt | 6 +- tests/legacy/003.txt | 6 +- tests/legacy/004.txt | 8 +- tests/legacy/005.txt | 6 +- tests/legacy/006.txt | 12 +- tests/legacy/007.txt | 10 +- tests/legacy/008.txt | 12 +- tests/legacy/009.txt | 14 +- tests/legacy/010.txt | 8 +- tests/legacy/011.txt | 6 +- tests/legacy/012.txt | 12 +- tests/legacy/013.txt | 16 +- tests/legacy/014.txt | 14 +- tests/legacy/015.txt | 6 +- tests/legacy/017.txt | 8 +- tests/legacy/018.txt | 10 +- tests/legacy/019.txt | 14 +- tests/legacy/020.txt | 12 +- tests/legacy/021.txt | 14 +- tests/legacy/022.txt | 10 +- tests/legacy/024.txt | 6 +- tests/legacy/025.txt | 8 +- tests/legacy/026.txt | 4 +- tests/legacy/027.txt | 6 +- tests/legacy/028.txt | 10 +- tests/legacy/029.txt | 8 +- tests/legacy/030.txt | 6 +- tests/legacy/031.txt | 2 +- tests/legacy/032.txt | 6 +- tests/legacy/033.txt | 6 +- tests/legacy/034.txt | 8 +- tests/legacy/035.txt | 6 +- tests/legacy/037.txt | 2 +- tests/legacy/038.txt | 2 +- tests/legacy/039.txt | 6 +- tests/legacy/041.txt | 2 +- tests/legacy/042.txt | 12 +- tests/legacy/043.txt | 6 +- tests/legacy/045.txt | 8 +- tests/legacy/046.txt | 6 +- tests/legacy/047.txt | 12 +- tests/legacy/048.txt | 8 +- tests/legacy/049.txt | 10 +- tests/legacy/050.txt | 10 +- tests/legacy/051.txt | 6 +- tests/legacy/052.txt | 14 +- tests/legacy/053.txt | 14 +- tests/malformed/001.txt | 5 + tests/malformed/005.txt | 5 + tests/malformed/009.txt | 5 + tests/malformed/010.txt | 37 +- tests/malformed/011.txt | 5 + tests/malformed/012.txt | 5 + tests/malformed/013.txt | 14 + tests/malformed/014.txt | 5 + tests/malformed/015.txt | 11 +- tests/malformed/016.txt | 5 + tests/thirdparty/000.txt | 63 ++ tests/thirdparty/001.txt | 80 +++ tests/thirdparty/002.txt | 85 +++ tests/thirdparty/003.txt | 132 ++++ tests/thirdparty/004.txt | 153 ++++ tests/thirdparty/005.txt | Bin 0 -> 2708 bytes tests/thirdparty/006.txt | 108 +++ tests/thirdparty/007.txt | 162 +++++ tests/thirdparty/008.txt | 181 +++++ tests/thirdparty/009.txt | 312 ++++++++ tests/thirdparty/010.txt | 44 ++ 75 files changed, 1668 insertions(+), 2120 deletions(-) delete mode 100644 tests/html/001.html delete mode 100644 tests/html/002.html create mode 100644 tests/thirdparty/000.txt create mode 100644 tests/thirdparty/001.txt create mode 100644 tests/thirdparty/002.txt create mode 100644 tests/thirdparty/003.txt create mode 100644 tests/thirdparty/004.txt create mode 100644 tests/thirdparty/005.txt create mode 100644 tests/thirdparty/006.txt create mode 100644 tests/thirdparty/007.txt create mode 100644 tests/thirdparty/008.txt create mode 100644 tests/thirdparty/009.txt create mode 100644 tests/thirdparty/010.txt diff --git a/src/decoders/html.rs b/src/decoders/html.rs index 77ef7b9..53ddd32 100644 --- a/src/decoders/html.rs +++ b/src/decoders/html.rs @@ -19,8 +19,11 @@ pub fn add_html_token(result: &mut String, token: &[u8], add_space: bool) { } else if (2..=31).contains(&entity.len()) { let mut hash = entity.len() as u32; - // Safe because ENTITY_HASH's size is 260 (u8::MAX + 4) - debug_assert!(ENTITY_HASH.len() == u8::MAX as usize + 4); + /* Safe because ENTITY_HASH's size is 260 (u8::MAX + 5) + and ENTITY_MAP's size is 18016 (18079 - 64 + 1) */ + debug_assert_eq!(ENTITY_HASH.len(), u8::MAX as usize + 5); + debug_assert_eq!(ENTITY_MAP.len(), 18079 - 64 + 1); + unsafe { for (pos, ch) in entity.iter().enumerate() { match pos { @@ -217,6 +220,7 @@ pub fn text_to_html(input: &str) -> String { match ch { b'\n' => result.extend_from_slice(b"
"), b'<' => result.extend_from_slice(b"<"), + b'\r' => (), _ => result.push(*ch), } } @@ -287,9 +291,6 @@ mod tests { for input in inputs { assert_eq!(html_to_text(input.0), input.1, "Failed for '{:?}'", input.0); } - - //let input = fs::read("002.html").unwrap(); - //println!("{}", html_to_text(std::str::from_utf8(&input).unwrap())); } #[test] @@ -336,7 +337,7 @@ static ENTITY_HASH: &[u32; 260] = &[ 18080, 18080, 18080, ]; -static ENTITY_MAP: &[u32] = &[ +static ENTITY_MAP: &[u32; 18016] = &[ 0x02192, 0, 0, 0, 0, 0x02190, 0, 0, 0, 0, 0, 0, 0, 0, 0x02AAB, 0, 0, 0, 0, 0, 0, 0, 0, 0x0226A, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02A99, 0, 0x02191, 0, 0, 0, 0x02225, 0x00029, 0x021FE, 0, 0, 0, 0x00028, 0x021FD, 0x021A3, 0, 0x022A5, 0x02225, 0, 0x021A2, 0, 0, 0x022D5, 0, 0, 0, 0x02A95, diff --git a/src/parsers/message.rs b/src/parsers/message.rs index b5ffc20..c933747 100644 --- a/src/parsers/message.rs +++ b/src/parsers/message.rs @@ -201,21 +201,11 @@ impl<'x> Message<'x> { let (is_multipart, mut is_inline, mut is_text, mut mime_type) = get_mime_type(header.get_content_type(), &state.mime_type); - /*println!( - "--- New part {:?} parent {:?} at '{:?}'", - mime_type, - state.mime_type, - stream - .get_string(stream.get_pos(), stream.get_pos() + 20, true) - .unwrap_or_else(|| "NOTHING".into()) - );*/ - if is_multipart { if let Some(mime_boundary) = header .get_content_type() .map_or_else(|| None, |f| f.get_attribute("boundary")) { - //println!("Found boundary '{}'", mime_boundary,); let mime_boundary = ("\n--".to_string() + mime_boundary).into_bytes(); if stream.seek_next_part(mime_boundary.as_ref()) { @@ -290,7 +280,6 @@ impl<'x> Message<'x> { // Attempt to recover contents of an invalid message if !success { - //println!("Failed to parse part, reattempting."); if !stream.is_eof() { // Get raw MIME part let (success, r_is_utf8_safe, r_bytes) = stream.get_bytes_to_boundary( @@ -374,8 +363,6 @@ impl<'x> Message<'x> { }, }; - //println!("'{:?}' {} {} {}", text_part.contents, add_to_html, add_to_text, is_inline); - let is_html = mime_type == MimeType::TextHtml; if add_to_html && !is_html { @@ -495,25 +482,9 @@ impl<'x> Message<'x> { if let Some(ref mime_boundary) = state.mime_boundary { // Ancestor has a MIME boundary, seek it. if stream.seek_next_part(mime_boundary) { - /*println!( - "Found ancestor MIME boundary '{:?}'", - std::str::from_utf8(mime_boundary).unwrap() - );*/ - continue 'inner; - } else { - /*println!( - "Boundary '{:?} not found.", - std::str::from_utf8(mime_boundary).unwrap() - );*/ } - } else { - // Ancestor does not have a MIME boundary, end parsing. - //println!("Ancestor has no MIME boundary, parent found?"); } - } else { - // No more ancestors found, finish parsing. - //println!("Finish parsing, no ancestors found."); } break 'outer; } else { @@ -527,58 +498,68 @@ impl<'x> Message<'x> { } } + while let Some(mut prev_message) = message_stack.pop() { + prev_message + .attachments + .push(AttachmentPart::Message(message)); + message = prev_message; + } + message } } #[cfg(test)] mod tests { - use std::{fs, path::PathBuf}; + use std::{fmt::format, fs, path::PathBuf}; use crate::parsers::message::Message; #[test] - fn body_parse() { + fn parse_full_messages() { const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes(); - for test_suite in ["rfc", "legacy", "malformed"] { + for test_suite in ["rfc", "legacy", "thirdparty", "malformed"] { let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); test_dir.push("tests"); test_dir.push(test_suite); for file_name in fs::read_dir(test_dir).unwrap() { - let mut input = fs::read(file_name.as_ref().unwrap().path()).unwrap(); + let file_name = file_name.as_ref().unwrap().path(); + let mut input = fs::read(&file_name).unwrap(); let mut pos = 0; + for sep_pos in 0..input.len() { if input[sep_pos..sep_pos + SEPARATOR.len()].eq(SEPARATOR) { pos = sep_pos; break; } } - assert!(pos > 0, "Failed to find separator."); - let input = input.split_at_mut(pos); + assert!( + pos > 0, + "Failed to find separator in test file '{}'.", + file_name.display() + ); + + let input = input.split_at_mut(pos); let message = Message::parse(input.0); - if (message - != serde_json::from_slice::(&input.1[SEPARATOR.len()..]).unwrap()) - { - println!("{}", serde_json::to_string_pretty(&message).unwrap()); - return; - } + assert_eq!( - Message::parse(input.0), + message, serde_json::from_slice::(&input.1[SEPARATOR.len()..]).unwrap(), - "Test failed for {}", - file_name.unwrap().path().display() + "Test failed for '{}', result was:\n{}", + file_name.display(), + serde_json::to_string_pretty(&message).unwrap() ); } } } - #[test] + /*#[test] fn generate_test_samples() { const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes(); - for test_suite in ["legacy" /*"legacy","malformed"*/] { + for test_suite in ["malformed" /*"legacy","malformed"*/] { let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); test_dir.push("tests"); test_dir.push(test_suite); @@ -622,5 +603,5 @@ mod tests { fs::write(file_name.as_ref().unwrap().path(), &output).unwrap(); } } - } + }*/ } diff --git a/src/parsers/message_stream.rs b/src/parsers/message_stream.rs index bcd701c..4577010 100644 --- a/src/parsers/message_stream.rs +++ b/src/parsers/message_stream.rs @@ -69,11 +69,6 @@ impl<'x> MessageStream<'x> { unsafe { (*self.data.get()).get(*self.pos.get()) } } - #[inline(always)] - pub fn peek_pos(&self, pos: usize) -> Option<&'x u8> { - unsafe { (*self.data.get()).get(pos) } - } - #[inline(always)] pub fn advance(&self, pos: usize) { unsafe { @@ -221,29 +216,12 @@ impl<'x> MessageStream<'x> { #[inline(always)] pub fn is_boundary_end(&self, pos: usize) -> bool { - if let Some([b'\n', ..]) + matches!(unsafe { (*self.data.get()).get(pos..) }, Some([b'\n', ..]) | Some([b'-', b'-', ..]) | Some([b'\r', b'\n', ..]) | Some([b' ' | b'\t', ..]) - | None = unsafe { (*self.data.get()).get(pos..) } - { - true - } else { - false - } - - /*unsafe { - let data = &mut *self.data.get(); - - match (*data).get(pos) { - Some(b'\n') => true, - Some(b'-') if (*data).get(pos + 1) == Some(&b'-') => true, - Some(b'\r') if (*data).get(pos + 1) == Some(&b'\n') => true, - Some(b' ') | Some(b'\t') => true, - None => true, - _ => false, - } - }*/ + | Some([]) + | None) } pub fn skip_multipart_end(&self) -> bool { @@ -251,21 +229,15 @@ impl<'x> MessageStream<'x> { let pos = &mut *self.pos.get(); match (*self.data.get()).get(*pos..*pos + 2) { - Some(b"--") => match (*self.data.get()).get(*pos + 2..) { - Some([b'\n', ..]) => { - *pos += 3; - true - } - Some([b'\r', b'\n', ..]) => { - *pos += 4; - true - } - None | Some([b' ' | b'\t', ..]) => { - *pos += 2; - true - } - _ => false, - }, + Some(b"--") => { + if let Some(byte) = (*self.data.get()).get(*pos + 2) { + if !(*byte).is_ascii_whitespace() { + return false; + } + } + *pos += 2; + true + } _ => false, } } diff --git a/tests/html/001.html b/tests/html/001.html deleted file mode 100644 index 0d1bbe4..0000000 --- a/tests/html/001.html +++ /dev/null @@ -1,560 +0,0 @@ - - - - - - - -

-

- - - - - - - - - - - - - -
- - -
-

Find a cool new spot in Chicago this week.

-
-
-  ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌  -
- - - - - - - - -
- - - - -
- -
-
- - - - - - -
- dining out -
- - - - - - -
- - - - -
-

Here’s to the simple pleasure of dining out

-

What’s better than hanging with your besties, eating great food, and not having to cook or clean? Check in with the people you love, and then check out a cool new restaurant in Chicago.

-
-
- - - - - - -
- - - - -
- - - - - -
-
- - - - - - -
- - - - -
-

Get your home ready for guests again

-

Looking forward to entertaining guests again, but need a helping hand? Read reviews on home cleaners nearby.

-
-
- - - - - - -
- - - - -
- - - - - - - - - -
-
- - - - - - -
- home cleaners -
- - - - - - -
- - - - -
-

Reintroduce yourself with a stylish new look

-

Discover new salons and barbershops in your area and read the latest reviews and updates from the business.

-
-
- - - - - - -
- - - - -
- - - - - - - - - -
-
- - - - - - -
- salons -
- - - - - - -
- - - - - - -
  - - info - -

Know, then go: Get up-to-date info directly from local businesses and the Yelp community, so you can know exactly what to expect during your visit. .

-
-
- - - - - - -
- - - - -
 
-
- - - - - - -
- - - - -
-

Be well and take care

-
-
- - - - - - -
- yelp -
- - - - - - -
- - - - -
-

Yelp

-
-
- - - - - - - - -
- - - - -
 
-
- - - - -
- - - - - - - -
- - - - - - - - -
-

This email was sent to hello@SmilesDavis.yeah -
Don't want to receive these emails anymore? Unsubscribe -
Manage all your notification settings here -

-

© 2021 | Yelp Inc, 140 Montgomery Street, San Francisco, CA 94105 | www.yelp.com

-
-
- - - - - - -
- - - - - -
- Download on the apple store - - Get it on Google Play -
-
- - - - -
- - - \ No newline at end of file diff --git a/tests/html/002.html b/tests/html/002.html deleted file mode 100644 index 8ee8cc9..0000000 --- a/tests/html/002.html +++ /dev/null @@ -1,1249 +0,0 @@ - - - - Free Google One gift - - - - - - - - - - - - - - - - - - - - - - - - -
YouTube Premium members can get extra storage, product help, and more.‌
-
-
- - - - - - - -
- - - - - - - - - - - -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-
- - - - - - - -
- - - - - - - -
- - - \ No newline at end of file diff --git a/tests/legacy/000.txt b/tests/legacy/000.txt index 0b035a7..f16a60b 100644 --- a/tests/legacy/000.txt +++ b/tests/legacy/000.txt @@ -86,20 +86,20 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } }, "others": { - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - ], "X-MSMail-Priority": [ "Normal" ], - "X-Priority": [ - "3 (Normal)" - ], "Importance": [ "Normal" ], + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" + ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" + ], + "X-Priority": [ + "3 (Normal)" ] } }, diff --git a/tests/legacy/001.txt b/tests/legacy/001.txt index 7f68381..759ba16 100644 --- a/tests/legacy/001.txt +++ b/tests/legacy/001.txt @@ -77,20 +77,20 @@ m+APw-ssen als wir.+ACI-=20 } }, "others": { - "X-MSMail-Priority": [ - "Normal" - ], - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - ], "X-Priority": [ "3 (Normal)" ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" ], + "X-MSMail-Priority": [ + "Normal" + ], "Importance": [ "Normal" + ], + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ] } }, diff --git a/tests/legacy/002.txt b/tests/legacy/002.txt index 8553188..2a5a82b 100644 --- a/tests/legacy/002.txt +++ b/tests/legacy/002.txt @@ -73,14 +73,14 @@ wir."
} }, "others": { + "X-Mailer": [ + "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + ], "X-Sender": [ "dwsauder@pop.example.com (Unverified)" ], "X-Priority": [ "2 (High)" - ], - "X-Mailer": [ - "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ] } }, diff --git a/tests/legacy/003.txt b/tests/legacy/003.txt index 6afea85..9d98604 100644 --- a/tests/legacy/003.txt +++ b/tests/legacy/003.txt @@ -99,12 +99,12 @@ wir."
} }, "others": { - "X-Sender": [ - "dwsauder@pop.example.com (Unverified)" - ], "X-Priority": [ "2 (High)" ], + "X-Sender": [ + "dwsauder@pop.example.com (Unverified)" + ], "X-Mailer": [ "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ] diff --git a/tests/legacy/004.txt b/tests/legacy/004.txt index b2485b8..d00d52e 100644 --- a/tests/legacy/004.txt +++ b/tests/legacy/004.txt @@ -54,20 +54,20 @@ Slow but steady wins the race. } }, "others": { - "X-Mailer": [ - "QUALCOMM Windows Eudora Pro Version 4.2.0.58" - ], "X-Priority": [ "5 (Lowest)" ], "X-Sender": [ "dwsauder@pop.example.com (Unverified)" + ], + "X-Mailer": [ + "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ] } }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise \r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r
\r
Slow but steady wins the race. \r
\r
" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.

" } ], "text_body": [ diff --git a/tests/legacy/005.txt b/tests/legacy/005.txt index f494b52..ebe76fa 100644 --- a/tests/legacy/005.txt +++ b/tests/legacy/005.txt @@ -72,15 +72,15 @@ m+APw-ssen als wir.+ACI-=20 "Importance": [ "Normal" ], + "X-MimeOLE": [ + "Produced By Microsoft MimeOLE V5.00.2314.1300" + ], "X-Mailer": [ "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], "X-Priority": [ "3 (Normal)" ], - "X-MimeOLE": [ - "Produced By Microsoft MimeOLE V5.00.2314.1300" - ], "X-MSMail-Priority": [ "Normal" ] diff --git a/tests/legacy/006.txt b/tests/legacy/006.txt index ece43ac..f59c25c 100644 --- a/tests/legacy/006.txt +++ b/tests/legacy/006.txt @@ -119,18 +119,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } }, "others": { - "X-Priority": [ - "3 (Normal)" - ], - "X-MSMail-Priority": [ - "Normal" - ], "Importance": [ "Normal" ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" ], + "X-MSMail-Priority": [ + "Normal" + ], + "X-Priority": [ + "3 (Normal)" + ], "X-Mailer": [ "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ] diff --git a/tests/legacy/007.txt b/tests/legacy/007.txt index beff8f4..dd28bb1 100644 --- a/tests/legacy/007.txt +++ b/tests/legacy/007.txt @@ -68,20 +68,20 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 } }, "others": { - "X-MSMail-Priority": [ + "X-Priority": [ + "3 (Normal)" + ], + "Importance": [ "Normal" ], "X-Mailer": [ "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], - "Importance": [ + "X-MSMail-Priority": [ "Normal" ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" - ], - "X-Priority": [ - "3 (Normal)" ] } }, diff --git a/tests/legacy/008.txt b/tests/legacy/008.txt index 9a42e5d..bbb66a9 100644 --- a/tests/legacy/008.txt +++ b/tests/legacy/008.txt @@ -171,20 +171,20 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } }, "others": { - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - ], - "Importance": [ - "Normal" - ], "X-Priority": [ "3 (Normal)" ], "X-MSMail-Priority": [ "Normal" ], + "Importance": [ + "Normal" + ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" + ], + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ] } }, diff --git a/tests/legacy/009.txt b/tests/legacy/009.txt index 2fac47a..2304287 100644 --- a/tests/legacy/009.txt +++ b/tests/legacy/009.txt @@ -69,22 +69,22 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." "c_type": "text", "c_subtype": "plain", "attributes": { - "format": "flowed", - "charset": "iso-8859-1" + "charset": "iso-8859-1", + "format": "flowed" } }, "others": { + "X-Mailer": [ + "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + ], "X-Priority": [ "1 (Highest)" ], - "X-Sender": [ - "dwsauder@pop.example.com (Unverified)" - ], "Disposition-Notification-To": [ "" ], - "X-Mailer": [ - "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + "X-Sender": [ + "dwsauder@pop.example.com (Unverified)" ] } }, diff --git a/tests/legacy/010.txt b/tests/legacy/010.txt index e2c9216..31c5986 100644 --- a/tests/legacy/010.txt +++ b/tests/legacy/010.txt @@ -58,12 +58,12 @@ In einem nahen Teich wollten sie sich nun ers } }, "others": { - "X-Mailer": [ - "QUALCOMM Windows Eudora Pro Version 4.2.0.58" - ], "X-Sender": [ "dwsauder@pop.example.com (Unverified)" ], + "X-Mailer": [ + "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + ], "X-Priority": [ "1 (Highest)" ] @@ -71,7 +71,7 @@ In einem nahen Teich wollten sie sich nun ers }, "html_body": [ { - "contents": "Die Hasen und die Frösche\r
\r
Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r
\r
In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r
\r
\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r
\r
\r
" + "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"


" } ], "text_body": [ diff --git a/tests/legacy/011.txt b/tests/legacy/011.txt index 9151ea4..ca398b0 100644 --- a/tests/legacy/011.txt +++ b/tests/legacy/011.txt @@ -66,11 +66,11 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= } }, "others": { - "X-Sender": [ - "dwsauder@pop.example.com (Unverified)" - ], "X-Mailer": [ "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + ], + "X-Sender": [ + "dwsauder@pop.example.com (Unverified)" ] } }, diff --git a/tests/legacy/012.txt b/tests/legacy/012.txt index c7b34b5..ed33d5b 100644 --- a/tests/legacy/012.txt +++ b/tests/legacy/012.txt @@ -67,18 +67,18 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 } }, "others": { - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - ], - "X-MimeOLE": [ - "Produced By Microsoft MimeOLE V5.00.2314.1300" - ], "X-MSMail-Priority": [ "Normal" ], "Importance": [ "Normal" ], + "X-MimeOLE": [ + "Produced By Microsoft MimeOLE V5.00.2314.1300" + ], + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" + ], "X-Priority": [ "3 (Normal)" ] diff --git a/tests/legacy/013.txt b/tests/legacy/013.txt index 6b220c8..8a1e69f 100644 --- a/tests/legacy/013.txt +++ b/tests/legacy/013.txt @@ -68,26 +68,26 @@ welche also wohl noch ungl } }, "others": { - "X-MSMail-Priority": [ - "Normal" + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], "Importance": [ "Normal" ], - "X-MimeOLE": [ - "Produced By Microsoft MimeOLE V5.00.2314.1300" - ], "X-Priority": [ "3 (Normal)" ], - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" + "X-MSMail-Priority": [ + "Normal" + ], + "X-MimeOLE": [ + "Produced By Microsoft MimeOLE V5.00.2314.1300" ] } }, "html_body": [ { - "contents": "Die Hasen und die Frösche\r
\r
Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r
Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r
selbst. Auf, laßt uns ein für allemal sterben.\"\r
\r
In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r
allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r
eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r
untertauchten.\r
\r
\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r
welche also wohl noch unglücklicher sein müssen als wir.\"\r
\r
" + "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der
Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod
selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;
allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte
eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste
untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,
welche also wohl noch unglücklicher sein müssen als wir.\"

" } ], "text_body": [ diff --git a/tests/legacy/014.txt b/tests/legacy/014.txt index f66201f..377e4ef 100644 --- a/tests/legacy/014.txt +++ b/tests/legacy/014.txt @@ -108,20 +108,20 @@ race. =20 } }, "others": { - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - ], - "X-MimeOLE": [ - "Produced By Microsoft MimeOLE V5.00.2314.1300" + "X-MSMail-Priority": [ + "Normal" ], "X-Priority": [ "3 (Normal)" ], - "X-MSMail-Priority": [ - "Normal" + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], "Importance": [ "Normal" + ], + "X-MimeOLE": [ + "Produced By Microsoft MimeOLE V5.00.2314.1300" ] } }, diff --git a/tests/legacy/015.txt b/tests/legacy/015.txt index 3d8309c..fec0a7e 100644 --- a/tests/legacy/015.txt +++ b/tests/legacy/015.txt @@ -234,14 +234,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } }, "others": { + "X-Sender": [ + "dwsauder@pop.example.com (Unverified)" + ], "X-Mailer": [ "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ], "X-Priority": [ "2 (High)" - ], - "X-Sender": [ - "dwsauder@pop.example.com (Unverified)" ] } }, diff --git a/tests/legacy/017.txt b/tests/legacy/017.txt index 918d5e6..34185f1 100644 --- a/tests/legacy/017.txt +++ b/tests/legacy/017.txt @@ -138,17 +138,17 @@ end } }, "others": { - "X-Mailer": [ - "QUALCOMM Windows Eudora Pro Version 4.2.0.58" - ], "X-Sender": [ "dwsauder@pop.example.com (Unverified)" + ], + "X-Mailer": [ + "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ] } }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise \r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r
\r
Slow but steady wins the race. \r
\r" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.
" } ], "text_body": [ diff --git a/tests/legacy/018.txt b/tests/legacy/018.txt index eda8954..7261eda 100644 --- a/tests/legacy/018.txt +++ b/tests/legacy/018.txt @@ -170,19 +170,19 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "c_type": "multipart", "c_subtype": "related", "attributes": { - "type": "multipart/alternative", - "boundary": "=====================_715157131==_.REL" + "boundary": "=====================_715157131==_.REL", + "type": "multipart/alternative" } }, "others": { "X-Priority": [ "2 (High)" ], - "X-Mailer": [ - "QUALCOMM Windows Eudora Pro Version 4.2.0.58" - ], "X-Sender": [ "dwsauder@pop.example.com (Unverified)" + ], + "X-Mailer": [ + "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ] } }, diff --git a/tests/legacy/019.txt b/tests/legacy/019.txt index bed1a0e..78b1c11 100644 --- a/tests/legacy/019.txt +++ b/tests/legacy/019.txt @@ -180,8 +180,11 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } }, "others": { - "X-Priority": [ - "3 (Normal)" + "X-MSMail-Priority": [ + "Normal" + ], + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], "Importance": [ "Normal" @@ -189,11 +192,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" ], - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - ], - "X-MSMail-Priority": [ - "Normal" + "X-Priority": [ + "3 (Normal)" ] } }, diff --git a/tests/legacy/020.txt b/tests/legacy/020.txt index 4221987..bbfc023 100644 --- a/tests/legacy/020.txt +++ b/tests/legacy/020.txt @@ -68,26 +68,26 @@ welche also wohl noch ungl } }, "others": { + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" + ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" ], - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" + "Importance": [ + "Normal" ], "X-MSMail-Priority": [ "Normal" ], "X-Priority": [ "3 (Normal)" - ], - "Importance": [ - "Normal" ] } }, "html_body": [ { - "contents": "Die Hasen und die Frösche\r
\r
Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r
Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r
selbst. Auf, laßt uns ein für allemal sterben.\"\r
\r
In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r
allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r
eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r
untertauchten.\r
\r
\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r
welche also wohl noch unglücklicher sein müssen als wir.\"\r
\r
" + "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der
Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod
selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;
allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte
eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste
untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,
welche also wohl noch unglücklicher sein müssen als wir.\"

" } ], "text_body": [ diff --git a/tests/legacy/021.txt b/tests/legacy/021.txt index 39be94c..b4d3ec0 100644 --- a/tests/legacy/021.txt +++ b/tests/legacy/021.txt @@ -224,20 +224,20 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } }, "others": { - "X-Priority": [ - "3 (Normal)" + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], "X-MSMail-Priority": [ "Normal" ], - "X-MimeOLE": [ - "Produced By Microsoft MimeOLE V5.00.2314.1300" - ], - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" + "X-Priority": [ + "3 (Normal)" ], "Importance": [ "Normal" + ], + "X-MimeOLE": [ + "Produced By Microsoft MimeOLE V5.00.2314.1300" ] } }, diff --git a/tests/legacy/022.txt b/tests/legacy/022.txt index 3475c27..252edf8 100644 --- a/tests/legacy/022.txt +++ b/tests/legacy/022.txt @@ -70,23 +70,23 @@ IiANCg== "X-Mailer": [ "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], + "X-MSMail-Priority": [ + "Normal" + ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" ], - "X-MSMail-Priority": [ + "Importance": [ "Normal" ], "X-Priority": [ "3 (Normal)" - ], - "Importance": [ - "Normal" ] } }, "html_body": [ { - "contents": "Die Hasen und die Frösche\r
\r
Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r
\r
In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r
\r
\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r
" + "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"
" } ], "text_body": [ diff --git a/tests/legacy/024.txt b/tests/legacy/024.txt index 9313662..074f129 100644 --- a/tests/legacy/024.txt +++ b/tests/legacy/024.txt @@ -149,11 +149,11 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "X-Priority": [ "2 (High)" ], - "X-Sender": [ - "dwsauder@pop.example.com (Unverified)" - ], "X-Mailer": [ "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + ], + "X-Sender": [ + "dwsauder@pop.example.com (Unverified)" ] } }, diff --git a/tests/legacy/025.txt b/tests/legacy/025.txt index 51df8cb..a9c9488 100644 --- a/tests/legacy/025.txt +++ b/tests/legacy/025.txt @@ -207,14 +207,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } }, "others": { - "X-Mailer": [ - "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + "X-Sender": [ + "dwsauder@pop.example.com (Unverified)" ], "X-Priority": [ "2 (High)" ], - "X-Sender": [ - "dwsauder@pop.example.com (Unverified)" + "X-Mailer": [ + "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ] } }, diff --git a/tests/legacy/026.txt b/tests/legacy/026.txt index 6fdf14e..ec2ff4e 100644 --- a/tests/legacy/026.txt +++ b/tests/legacy/026.txt @@ -163,9 +163,9 @@ Birds of a feather flock together. "c_type": "text", "c_subtype": "plain", "attributes": { + "x-mac-creator": "74747874", "name": "HasenundFr�sche.txt", - "x-mac-type": "54455854", - "x-mac-creator": "74747874" + "x-mac-type": "54455854" } } }, diff --git a/tests/legacy/027.txt b/tests/legacy/027.txt index 7c1218e..6205f67 100644 --- a/tests/legacy/027.txt +++ b/tests/legacy/027.txt @@ -68,9 +68,6 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 } }, "others": { - "X-MSMail-Priority": [ - "Normal" - ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" ], @@ -80,6 +77,9 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 "Importance": [ "Normal" ], + "X-MSMail-Priority": [ + "Normal" + ], "X-Priority": [ "3 (Normal)" ] diff --git a/tests/legacy/028.txt b/tests/legacy/028.txt index 4018a8f..6256842 100644 --- a/tests/legacy/028.txt +++ b/tests/legacy/028.txt @@ -192,18 +192,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } }, "others": { - "X-MSMail-Priority": [ - "Normal" - ], "X-Mailer": [ "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], - "X-Priority": [ - "3 (Normal)" + "X-MSMail-Priority": [ + "Normal" ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" ], + "X-Priority": [ + "3 (Normal)" + ], "Importance": [ "Normal" ] diff --git a/tests/legacy/029.txt b/tests/legacy/029.txt index 1915b3a..df6490b 100644 --- a/tests/legacy/029.txt +++ b/tests/legacy/029.txt @@ -64,12 +64,12 @@ Slow but steady wins the race. } }, "others": { - "X-Accept-Language": [ - "en" - ], "X-Mailer": [ "Mozilla 4.7 [en] (WinNT; I)" ], + "X-Accept-Language": [ + "en" + ], "X-Priority": [ "1 (Highest)" ] @@ -77,7 +77,7 @@ Slow but steady wins the race. }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise \r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise,\r
who replied, laughing: \"Though you be swift as the wind, I will beat\r
you in a race.\" The Hare, believing her assertion to be simply\r
impossible, assented to the proposal; and they agreed that the Fox\r
should choose the course and fix the goal. On the day appointed for the\r
race the two started together. The Tortoise never for a moment stopped,\r
but went on with a slow but steady pace straight to the end of the\r
course. The Hare, lying down by the wayside, fell fast asleep. At last\r
waking up, and moving as fast as he could, he saw the Tortoise had\r
reached the goal, and was comfortably dozing after her fatigue. \r
\r
Slow but steady wins the race.\r
" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.
" } ], "text_body": [ diff --git a/tests/legacy/030.txt b/tests/legacy/030.txt index 6a15b7a..1a14312 100644 --- a/tests/legacy/030.txt +++ b/tests/legacy/030.txt @@ -157,7 +157,7 @@ Slow but steady wins the race. }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise \r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise,\r
who replied, laughing: \"Though you be swift as the wind, I will beat\r
you in a race.\" The Hare, believing her assertion to be simply\r
impossible, assented to the proposal; and they agreed that the Fox\r
should choose the course and fix the goal. On the day appointed for the\r
race the two started together. The Tortoise never for a moment stopped,\r
but went on with a slow but steady pace straight to the end of the\r
course. The Hare, lying down by the wayside, fell fast asleep. At last\r
waking up, and moving as fast as he could, he saw the Tortoise had\r
reached the goal, and was comfortably dozing after her fatigue. \r
\r
Slow but steady wins the race.\r" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race." }, 0, 1 @@ -2861,8 +2861,8 @@ Slow but steady wins the race. "c_type": "text", "c_subtype": "plain", "attributes": { - "charset": "us-ascii", - "name": "hareandtoroise.txt" + "name": "hareandtoroise.txt", + "charset": "us-ascii" } } }, diff --git a/tests/legacy/031.txt b/tests/legacy/031.txt index 8e72b00..413f2c8 100644 --- a/tests/legacy/031.txt +++ b/tests/legacy/031.txt @@ -134,7 +134,7 @@ Z3VldDZzO7wAAAAASUVORK5CYII= }, "html_body": [ { - "contents": "This is a test message from PINE MUA.\r
\r
\r" + "contents": "This is a test message from PINE MUA.

" } ], "text_body": [ diff --git a/tests/legacy/032.txt b/tests/legacy/032.txt index 45df401..e52354b 100644 --- a/tests/legacy/032.txt +++ b/tests/legacy/032.txt @@ -169,11 +169,11 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } }, "others": { - "X-Mailer": [ - "Mozilla 4.7 [en] (WinNT; I)" - ], "X-Accept-Language": [ "en" + ], + "X-Mailer": [ + "Mozilla 4.7 [en] (WinNT; I)" ] } }, diff --git a/tests/legacy/033.txt b/tests/legacy/033.txt index 02e6801..5efd0a8 100644 --- a/tests/legacy/033.txt +++ b/tests/legacy/033.txt @@ -73,11 +73,11 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." "X-Mailer": [ "Mozilla 4.7 [en] (WinNT; I)" ], - "X-Priority": [ - "5 (Lowest)" - ], "X-Accept-Language": [ "en" + ], + "X-Priority": [ + "5 (Lowest)" ] } }, diff --git a/tests/legacy/034.txt b/tests/legacy/034.txt index 84e8a20..65129a8 100644 --- a/tests/legacy/034.txt +++ b/tests/legacy/034.txt @@ -63,17 +63,17 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir." } }, "others": { - "X-Mailer": [ - "Mozilla 4.7 [en] (WinNT; I)" - ], "X-Accept-Language": [ "en" + ], + "X-Mailer": [ + "Mozilla 4.7 [en] (WinNT; I)" ] } }, "html_body": [ { - "contents": "Die Hasen und die Fr岣he\r
\r
Die Hasen klagten einst 롥r ihre miެiche Lage; \"wir leben\", sprach ein\r
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\r
der Adler, ja fast aller Raubtiere! Unsere stete Angst ist 㱧er als der\r
Tod selbst. Auf, la޴ uns ein f밠allemal sterben.\" \r
\r
In einem nahen Teich wollten sie sich nun ers㴦en; sie eilten ihm zu;\r
allein das auޥrordentliche Get岥 und ihre wunderbare Gestalt\r
erschreckte eine Menge Fr岣he, die am Ufer saޥn, so sehr, daݠsie aufs\r
schnellste untertauchten. \r
\r
\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers㴦en noch ein\r
wenig aufschieben, denn auch uns f뱣hten, wie ihr seht, einige Tiere,\r
welche also wohl noch ungl뢫licher sein m벳en als wir.\"\r
" + "contents": "Die Hasen und die Fr岣he

Die Hasen klagten einst 롥r ihre miެiche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,
der Adler, ja fast aller Raubtiere! Unsere stete Angst ist 㱧er als der
Tod selbst. Auf, la޴ uns ein f밠allemal sterben.\"

In einem nahen Teich wollten sie sich nun ers㴦en; sie eilten ihm zu;
allein das auޥrordentliche Get岥 und ihre wunderbare Gestalt
erschreckte eine Menge Fr岣he, die am Ufer saޥn, so sehr, daݠsie aufs
schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers㴦en noch ein
wenig aufschieben, denn auch uns f뱣hten, wie ihr seht, einige Tiere,
welche also wohl noch ungl뢫licher sein m벳en als wir.\"
" } ], "text_body": [ diff --git a/tests/legacy/035.txt b/tests/legacy/035.txt index 312cef6..b060b1c 100644 --- a/tests/legacy/035.txt +++ b/tests/legacy/035.txt @@ -248,11 +248,11 @@ YII= } }, "others": { - "X-Mailer": [ - "Mozilla 4.7 [en] (WinNT; I)" - ], "X-Accept-Language": [ "en" + ], + "X-Mailer": [ + "Mozilla 4.7 [en] (WinNT; I)" ] } }, diff --git a/tests/legacy/037.txt b/tests/legacy/037.txt index 7c6dbeb..944aab4 100644 --- a/tests/legacy/037.txt +++ b/tests/legacy/037.txt @@ -97,7 +97,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= }, "html_body": [ { - "contents": " \r" + "contents": " " }, 0 ], diff --git a/tests/legacy/038.txt b/tests/legacy/038.txt index 370bc77..5c613ab 100644 --- a/tests/legacy/038.txt +++ b/tests/legacy/038.txt @@ -64,7 +64,7 @@ Slow but steady wins the race. }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise \r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r
\r
Slow but steady wins the race.\r
" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.
" } ], "text_body": [ diff --git a/tests/legacy/039.txt b/tests/legacy/039.txt index 78736f6..9f2311a 100644 --- a/tests/legacy/039.txt +++ b/tests/legacy/039.txt @@ -207,11 +207,11 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } }, "others": { - "X-Mailer": [ - "Mozilla 4.7 [en] (WinNT; I)" - ], "X-Accept-Language": [ "en" + ], + "X-Mailer": [ + "Mozilla 4.7 [en] (WinNT; I)" ] } }, diff --git a/tests/legacy/041.txt b/tests/legacy/041.txt index 85f75d9..ddb5614 100644 --- a/tests/legacy/041.txt +++ b/tests/legacy/041.txt @@ -95,7 +95,7 @@ vAAAAABJRU5ErkJggg== }, "html_body": [ { - "contents": "\r" + "contents": "" } ], "text_body": [ diff --git a/tests/legacy/042.txt b/tests/legacy/042.txt index d3e0527..826a13e 100644 --- a/tests/legacy/042.txt +++ b/tests/legacy/042.txt @@ -94,17 +94,17 @@ Birds of a feather flock together. } }, "others": { - "X-Mailer": [ - "Mozilla 4.7 [en] (WinNT; I)" - ], "X-Accept-Language": [ "en" + ], + "X-Mailer": [ + "Mozilla 4.7 [en] (WinNT; I)" ] } }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise \r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise,\r
who replied, laughing: \"Though you be swift as the wind, I will beat\r
you in a race.\" The Hare, believing her assertion to be simply\r
impossible, assented to the proposal; and they agreed that the Fox\r
should choose the course and fix the goal. On the day appointed for the\r
race the two started together. The Tortoise never for a moment stopped,\r
but went on with a slow but steady pace straight to the end of the\r
course. The Hare, lying down by the wayside, fell fast asleep. At last\r
waking up, and moving as fast as he could, he saw the Tortoise had\r
reached the goal, and was comfortably dozing after her fatigue. \r
\r
Slow but steady wins the race.\r" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race." } ], "text_body": [ @@ -137,8 +137,8 @@ Birds of a feather flock together. "c_type": "text", "c_subtype": "plain", "attributes": { - "name": "farmerandstork.txt", - "charset": "us-ascii" + "charset": "us-ascii", + "name": "farmerandstork.txt" } } }, diff --git a/tests/legacy/043.txt b/tests/legacy/043.txt index b9802fe..bc36213 100644 --- a/tests/legacy/043.txt +++ b/tests/legacy/043.txt @@ -97,11 +97,11 @@ als wir." } }, "others": { - "X-Mailer": [ - "Mozilla 4.7 [en] (WinNT; I)" - ], "X-Accept-Language": [ "en" + ], + "X-Mailer": [ + "Mozilla 4.7 [en] (WinNT; I)" ] } }, diff --git a/tests/legacy/045.txt b/tests/legacy/045.txt index a529dba..6a8cec3 100644 --- a/tests/legacy/045.txt +++ b/tests/legacy/045.txt @@ -86,7 +86,7 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= }, "html_body": [ { - "contents": "\r" + "contents": "" } ], "text_body": [ @@ -111,7 +111,7 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= "content_disposition": { "c_type": "attachment", "attributes": { - "filename": "iso-8859-1''HasenundFr%F6sche.txt" + "filename": "HasenundFrösche.txt" } }, "content_id": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com", @@ -120,8 +120,8 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= "c_type": "text", "c_subtype": "plain", "attributes": { - "name": "iso-8859-1''HasenundFr%F6sche.txt", - "charset": "iso-8859-1" + "charset": "iso-8859-1", + "name": "HasenundFrösche.txt" } } }, diff --git a/tests/legacy/046.txt b/tests/legacy/046.txt index 44f37da..e6372d3 100644 --- a/tests/legacy/046.txt +++ b/tests/legacy/046.txt @@ -69,11 +69,11 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." } }, "others": { - "X-Mailer": [ - "Mozilla 4.7 [en] (WinNT; I)" - ], "X-Accept-Language": [ "en" + ], + "X-Mailer": [ + "Mozilla 4.7 [en] (WinNT; I)" ] } }, diff --git a/tests/legacy/047.txt b/tests/legacy/047.txt index 6b061d5..a823235 100644 --- a/tests/legacy/047.txt +++ b/tests/legacy/047.txt @@ -96,17 +96,17 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= } }, "others": { - "X-Mailer": [ - "Mozilla 4.7 [en] (WinNT; I)" - ], "X-Accept-Language": [ "en" + ], + "X-Mailer": [ + "Mozilla 4.7 [en] (WinNT; I)" ] } }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise \r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise,\r
who replied, laughing: \"Though you be swift as the wind, I will beat\r
you in a race.\" The Hare, believing her assertion to be simply\r
impossible, assented to the proposal; and they agreed that the Fox\r
should choose the course and fix the goal. On the day appointed for the\r
race the two started together. The Tortoise never for a moment stopped,\r
but went on with a slow but steady pace straight to the end of the\r
course. The Hare, lying down by the wayside, fell fast asleep. At last\r
waking up, and moving as fast as he could, he saw the Tortoise had\r
reached the goal, and was comfortably dozing after her fatigue. \r
\r
Slow but steady wins the race.\r" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race." } ], "text_body": [ @@ -139,8 +139,8 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= "c_type": "text", "c_subtype": "plain", "attributes": { - "charset": "iso-8859-1", - "name": "HasenundFrösche.txt" + "name": "HasenundFrösche.txt", + "charset": "iso-8859-1" } } }, diff --git a/tests/legacy/048.txt b/tests/legacy/048.txt index 92a8090..a605894 100644 --- a/tests/legacy/048.txt +++ b/tests/legacy/048.txt @@ -191,17 +191,17 @@ end } }, "others": { - "X-Accept-Language": [ - "en" - ], "X-Mailer": [ "Mozilla 4.7 [en] (WinNT; I)" + ], + "X-Accept-Language": [ + "en" ] } }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise \r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise,\r
who replied, laughing: \"Though you be swift as the wind, I will beat\r
you in a race.\" The Hare, believing her assertion to be simply\r
impossible, assented to the proposal; and they agreed that the Fox\r
should choose the course and fix the goal. On the day appointed for the\r
race the two started together. The Tortoise never for a moment stopped,\r
but went on with a slow but steady pace straight to the end of the\r
course. The Hare, lying down by the wayside, fell fast asleep. At last\r
waking up, and moving as fast as he could, he saw the Tortoise had\r
reached the goal, and was comfortably dozing after her fatigue. \r
\r
Slow but steady wins the race.\r" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race." }, 0, 1, diff --git a/tests/legacy/049.txt b/tests/legacy/049.txt index b6d1ad5..db3b012 100644 --- a/tests/legacy/049.txt +++ b/tests/legacy/049.txt @@ -162,23 +162,23 @@ end "X-Priority": [ "3 (Normal)" ], - "X-MSMail-Priority": [ - "Normal" - ], "X-Mailer": [ "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" ], - "Importance": [ + "X-MSMail-Priority": [ "Normal" ], "X-MimeOLE": [ "Produced By Microsoft MimeOLE V5.00.2314.1300" + ], + "Importance": [ + "Normal" ] } }, "html_body": [ { - "contents": "\r
The Hare and the Tortoise\r
\r
A HARE one day ridiculed the short feet and slow pace of the Tortoise, who\r
replied, laughing: \"Though you be swift as the wind, I will beat you in a\r
race.\" The Hare, believing her assertion to be simply impossible, assented\r
to the proposal; and they agreed that the Fox should choose the course and\r
fix the goal. On the day appointed for the race the two started together.\r
The Tortoise never for a moment stopped, but went on with a slow but steady\r
pace straight to the end of the course. The Hare, lying down by the\r
wayside, fell fast asleep. At last waking up, and moving as fast as he\r
could, he saw the Tortoise had reached the goal, and was comfortably dozing\r
after her fatigue.\r
\r
Slow but steady wins the race.\r
\r
\r
begin 666 blueball.png\r
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r
M``@``! ``!@`````\"\"D`$$(`$$H`\"#$`$%(((7,(*7L(*80((6L`&%H`\"#D(\r
M(6,0.9P80J480JT80K40.:40,90`&%(0,8PI4K4Y8\\8Y8\\XI6LX82LX80LX8\r
M0KU\":\\9[G-:<O=Z,M=YCE.<Q:]XA4MX82M880L80,:4``\"'.Y^_G[^^<QN]2\r
MA.\\I6N<0.:U*>\\ZMSMZESN]:C.\\0,9Q:A-:MUN?.[^^,O>]*>^\\8.:482L:,\r
MO>>UY^^4O>\\``\"E:C.=SI>]KG.\\(*8PQ8^\\I6N\\((7L`````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M``````````````````````````````````````````````````````````#!\r
M,@U5`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N\r
M,3U>OF@```&(241!5'B<==)M5YLP& ;@$DZ )A!2DX;,\"4RG!2+:JHO;K&_;\r
M?/G_ORA[TE;LL<>;+YQSG3LAY!F-A@0H1\"APHYT$.(HA48+#CXS'A*80DK$H\r
M0=OH<DXG>T(*,54I*9+0#>J23(LO^U\\/RJJ64PV(!L1,[WT[//I^?#)K6MGI\r
M+#)O>P8QG>P?GO:G9^?SIFP7BC\"\\*;J$:W%QV??]U8]Y4]7\"4I:#>0PB,I'7\r
M/_O^U^^;65/60H&%:PMCNKR]OKN_?_\"U5B[>S3T66I0'?_[^N_&[U:+3A*_,\r
MC1QF3Z*=S9]?&D]R:M,L3@9+EW75@%1 \"ZLIC_UW>GLLJ)5M65:W-=!2:<+\\\r
M^59F8J*F==U\"28H.B,.2&PMSEJJE%%(N.JOT:U9$9K4D6(\"++%6VZZRU*O6$\r
MUS5_B# 'U$HIG5+\"BR@9\"(HF'W-\"*7TEG(^!UBNNS\"&3QP7CG#.X=[-I;7XV\r
M8))'D!PF`FV3QP`9@XT)W^7M;OUK@. 9P&T-Q6ZVI^E3^8B[X[L#_P$45,S8\r
MF6D.OP```\"5T15AT0V]M;65N= !C;&EP,F=I9B!V+C N-B!B>2!9=F5S(%!I\r
49W5E=#9S.[P`````245.1*Y\"8((`\r
`\r
end\r
\r
begin 666 greenball.png\r
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r
M````$ ``& ``(0``\" ``,0``0@``4@``6@``2@`(8P`(<P`(>P`0C `(:P``\r
M.0``8P`0E `0G `AI0`0I0`AK0!\"O1ACQC%CQCE2QB$IS@`8O0`0K0`8K0`A\r
MO0\"4UF.MUGN$UE)*WA@AU@`8Q@`8M0``*0!\"SA#.YY3>YZW&YY24YV-2YR$A\r
MW@`8S@!2WB&<YVO6[YR][XR$[U)\"[Q\"M[WNEWG-:[RDAYP`8U@`QYP!2[R%K\r
M[SE*[Q@IYP`I[P`Q[P`(A `0M0``````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M```````````````````````````````````````````````````````````I\r
MU?G9`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N\r
M,3U>OF@```%M241!5'B<==)M5\\(@% =P#VS(@,$$U^-<J=LH*^FYM\"RS[_^9\r
MB+F'LRSOJYWS._<R^-]>KRU;5>]/60`]SX,0^'\\8HC[&`29]Y('?:!&F+.2<\r
MAR(@R.NVVF@02C4<#N-8<H&C+B+*U<'AT?'):3**.<,(M@8Q3\\].SL?CR33+\r
M\"\\4%T<V9-F*JN)A<SJZN;^8F25481%Y]&>#:LMN[^]G#XU-FDB)VC<V)WD 6\r
M9]/KYY?'U\\72F1N*4374:J'R[.U]M?KX-%E>_PW8#K614(E9K+_6\\Z7)DR)5\r
M&]$:$C(QV7R9F9)&BH>4:+^V`8\\38\\HF1ZGD+*AN[TSC4*5)7LIWJN2V#52)\r
M6-AWSS)*\"R>Q(T9Q!/W:?$T$ERJ.E9)RP\\KW!$V2%B)\"RQ XWX2\"D@ZY1A=>\r
M0!EC0M\"@W]+6K ]T1##&U$6K84.VWA,`-4*11EZU$YV]<1^^#V&Y+*TTV=K_\r
MJK<?N]NT5W;QG_7=A1_-8>>-T@@L+ ```\"5T15AT0V]M;65N= !C;&EP,F=I\r
F9B!V+C N-B!B>2!9=F5S(%!I9W5E=#9S.[P`````245.1*Y\"8((`\r
`\r
end\r
\r
begin 666 redball.png\r
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r
M```!```+```5```:```7```1```*```#```<```R``!$``!-``!(```]```C\r
M```6```F``!A``![``\"&``\"'``!]``!T``!@```Y```4```&```G``!+``!O\r
M``\"0``\"E``\"[``\"_``\"K``\"A``\",``!S``!;```N```(``!,``!W``\"9``\"T\r
M&1G*.#C5/3W;*2G=!06X``\"H``!Y```Q```8```$``!%``\":``\"[)\"3186'?\r
MA(3F?W_F5E;J'Q_2``\"Y``\"C``!=``!\"```H```)``!G``\"Z#P_05%3>DY/E\r
MK*SIF9GM967O)277``#!``\"Q``\"<``!M``!3```V```;```%``!*``\"!``#+\r
M(\"#=9V?HG)SKIJ;MBHKO45'O%!31``##``\"V``!X``!>``! ```B``!7``\"2\r
M``#\"``#:&QOH557L>'CO>'CO5U?O)B;A``#.``\"W``\"G``\"5``!'```K```/\r
M``\"=``#%``#A!07K*\"CO/#SO-37O&QOC``#0``#)``\"U``\"7``\"$``!L``!/\r
M```2```\"``!B``#I``#O`@+G``#8``#+``\"Z``\"P``!P```3```D``!8``#(\r
M``#3``#-``\"S``\"#``!N```>``!^``# ``\"D``\"-``!_``!I``!0```P``\"1\r
M``\"I``\"\\``\"J``\";``!E``!)```J```.```T``\"L``\"O``\"M``\"F``\")``!Z\r
M``!K``!:```^```I``!J``\"\"``\"?``\">``\"6``\"/``!\\```9```'``!5``\".\r
M``\"*```X```0```_``!R``\" ``!<```W```L``!F``!#``!6```@```S```\\\r
M```Z```?```,```=```-````````````````````````````````````````\r
M````````````````````````````````````````````````````````````\r
M``````````````````````````````````````````````````````````#\\\r
M+ME%`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N\r
M,3U>OF@```((241!5'B<8V\" @_\\0P( !F)A96%G9V#DX,:4YN+AY>'GY^+D%\r
M!#E0)?\\S\"_$(BXB*B4M(\\DH)2<L@R?YGEI635U!44E9155/7X-%DU4)(R@AI\r
MZ^CJZ1L8&AF;*)@*\\YF96\\#D_K-:2EA9V]C:V3LX.CDKZ+BXNK%#-?YW-_.P\r
M\\O3R]O'U\\P\\(# H6#0D-\"X^ 2/YGBXP*BHZ)C8M/2$Q*3G%62$U+%X Z]G]&\r
M9E9V3FY>?D%A47%R26E9E$=Y1258[C^3D&15=4UM77U#8U.S<DMI:UM[AV8G\r
M. C^=[EUMRH[]O3V]2=-2)XX2;%5='(H]Q2('-/4:6J3IB?-2)K9G*TT2T4U\r
M:_:<4&YIB-S_N7+S5)VJFZ=7SY\\X2V6!U<)%BY<LA9KYW]Q5?MGR%*453BV3\r
M5CJORA)+7;UF[3JH'/MZ%_'6T@T;-ZW<K&J5M67KMNT[!)BA<LP[U^S:G16\\\r
M9\\]>JWW[10_(IZTQ.W@($E7_+;BD#F\\3WZ*P;-F1H[.WSI'D/29P'!J+__\\?\r
MESUQV..DR*)3B[:J;SNM?49(V@(N%\\%VEK_#Y=PV^?9=PIE\\85.E(^\")X_]_\r
MCH.R8>=Y0S,OA&JGFV5T6B\"EF___#TE?7'M)ZO+E*]P[KQ[O0DY20);%M2FL\r
MUR]>O7B=[09:<@.QF2QDM-S=M2PP4^)_5(\":\"/%(84W7`)A(.MC?YL?R````\r
M)71%6'1#;VUM96YT`&-L:7 R9VEF('8N,\"XV(&)Y(%EV97,@4&EG=65T-G,[\r
-O ````!)14Y$KD)@@@``\r
`\r
end\r
" + "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who
replied, laughing: \"Though you be swift as the wind, I will beat you in a
race.\" The Hare, believing her assertion to be simply impossible, assented
to the proposal; and they agreed that the Fox should choose the course and
fix the goal. On the day appointed for the race the two started together.
The Tortoise never for a moment stopped, but went on with a slow but steady
pace straight to the end of the course. The Hare, lying down by the
wayside, fell fast asleep. At last waking up, and moving as fast as he
could, he saw the Tortoise had reached the goal, and was comfortably dozing
after her fatigue.

Slow but steady wins the race.


begin 666 blueball.png
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`
M``@``! ``!@`````\"\"D`$$(`$$H`\"#$`$%(((7,(*7L(*80((6L`&%H`\"#D(
M(6,0.9P80J480JT80K40.:40,90`&%(0,8PI4K4Y8\\8Y8\\XI6LX82LX80LX8
M0KU\":\\9[G-:<O=Z,M=YCE.<Q:]XA4MX82M880L80,:4``\"'.Y^_G[^^<QN]2
MA.\\I6N<0.:U*>\\ZMSMZESN]:C.\\0,9Q:A-:MUN?.[^^,O>]*>^\\8.:482L:,
MO>>UY^^4O>\\``\"E:C.=SI>]KG.\\(*8PQ8^\\I6N\\((7L`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````#!
M,@U5`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N
M,3U>OF@```&(241!5'B<==)M5YLP& ;@$DZ )A!2DX;,\"4RG!2+:JHO;K&_;
M?/G_ORA[TE;LL<>;+YQSG3LAY!F-A@0H1\"APHYT$.(HA48+#CXS'A*80DK$H
M0=OH<DXG>T(*,54I*9+0#>J23(LO^U\\/RJJ64PV(!L1,[WT[//I^?#)K6MGI
M+#)O>P8QG>P?GO:G9^?SIFP7BC\"\\*;J$:W%QV??]U8]Y4]7\"4I:#>0PB,I'7
M/_O^U^^;65/60H&%:PMCNKR]OKN_?_\"U5B[>S3T66I0'?_[^N_&[U:+3A*_,
MC1QF3Z*=S9]?&D]R:M,L3@9+EW75@%1 \"ZLIC_UW>GLLJ)5M65:W-=!2:<+\\
M^59F8J*F==U\"28H.B,.2&PMSEJJE%%(N.JOT:U9$9K4D6(\"++%6VZZRU*O6$
MUS5_B# 'U$HIG5+\"BR@9\"(HF'W-\"*7TEG(^!UBNNS\"&3QP7CG#.X=[-I;7XV
M8))'D!PF`FV3QP`9@XT)W^7M;OUK@. 9P&T-Q6ZVI^E3^8B[X[L#_P$45,S8
MF6D.OP```\"5T15AT0V]M;65N= !C;&EP,F=I9B!V+C N-B!B>2!9=F5S(%!I
49W5E=#9S.[P`````245.1*Y\"8((`
`
end

begin 666 greenball.png
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`
M````$ ``& ``(0``\" ``,0``0@``4@``6@``2@`(8P`(<P`(>P`0C `(:P``
M.0``8P`0E `0G `AI0`0I0`AK0!\"O1ACQC%CQCE2QB$IS@`8O0`0K0`8K0`A
MO0\"4UF.MUGN$UE)*WA@AU@`8Q@`8M0``*0!\"SA#.YY3>YZW&YY24YV-2YR$A
MW@`8S@!2WB&<YVO6[YR][XR$[U)\"[Q\"M[WNEWG-:[RDAYP`8U@`QYP!2[R%K
M[SE*[Q@IYP`I[P`Q[P`(A `0M0``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````````I
MU?G9`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N
M,3U>OF@```%M241!5'B<==)M5\\(@% =P#VS(@,$$U^-<J=LH*^FYM\"RS[_^9
MB+F'LRSOJYWS._<R^-]>KRU;5>]/60`]SX,0^'\\8HC[&`29]Y('?:!&F+.2<
MAR(@R.NVVF@02C4<#N-8<H&C+B+*U<'AT?'):3**.<,(M@8Q3\\].SL?CR33+
M\"\\4%T<V9-F*JN)A<SJZN;^8F25481%Y]&>#:LMN[^]G#XU-FDB)VC<V)WD 6
M9]/KYY?'U\\72F1N*4374:J'R[.U]M?KX-%E>_PW8#K614(E9K+_6\\Z7)DR)5
M&]$:$C(QV7R9F9)&BH>4:+^V`8\\38\\HF1ZGD+*AN[TSC4*5)7LIWJN2V#52)
M6-AWSS)*\"R>Q(T9Q!/W:?$T$ERJ.E9)RP\\KW!$V2%B)\"RQ XWX2\"D@ZY1A=>
M0!EC0M\"@W]+6K ]T1##&U$6K84.VWA,`-4*11EZU$YV]<1^^#V&Y+*TTV=K_
MJK<?N]NT5W;QG_7=A1_-8>>-T@@L+ ```\"5T15AT0V]M;65N= !C;&EP,F=I
F9B!V+C N-B!B>2!9=F5S(%!I9W5E=#9S.[P`````245.1*Y\"8((`
`
end

begin 666 redball.png
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`
M```!```+```5```:```7```1```*```#```<```R``!$``!-``!(```]```C
M```6```F``!A``![``\"&``\"'``!]``!T``!@```Y```4```&```G``!+``!O
M``\"0``\"E``\"[``\"_``\"K``\"A``\",``!S``!;```N```(``!,``!W``\"9``\"T
M&1G*.#C5/3W;*2G=!06X``\"H``!Y```Q```8```$``!%``\":``\"[)\"3186'?
MA(3F?W_F5E;J'Q_2``\"Y``\"C``!=``!\"```H```)``!G``\"Z#P_05%3>DY/E
MK*SIF9GM967O)277``#!``\"Q``\"<``!M``!3```V```;```%``!*``\"!``#+
M(\"#=9V?HG)SKIJ;MBHKO45'O%!31``##``\"V``!X``!>``! ```B``!7``\"2
M``#\"``#:&QOH557L>'CO>'CO5U?O)B;A``#.``\"W``\"G``\"5``!'```K```/
M``\"=``#%``#A!07K*\"CO/#SO-37O&QOC``#0``#)``\"U``\"7``\"$``!L``!/
M```2```\"``!B``#I``#O`@+G``#8``#+``\"Z``\"P``!P```3```D``!8``#(
M``#3``#-``\"S``\"#``!N```>``!^``# ``\"D``\"-``!_``!I``!0```P``\"1
M``\"I``\"\\``\"J``\";``!E``!)```J```.```T``\"L``\"O``\"M``\"F``\")``!Z
M``!K``!:```^```I``!J``\"\"``\"?``\">``\"6``\"/``!\\```9```'``!5``\".
M``\"*```X```0```_``!R``\" ``!<```W```L``!F``!#``!6```@```S```\\
M```Z```?```,```=```-````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````#\\
M+ME%`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N
M,3U>OF@```((241!5'B<8V\" @_\\0P( !F)A96%G9V#DX,:4YN+AY>'GY^+D%
M!#E0)?\\S\"_$(BXB*B4M(\\DH)2<L@R?YGEI635U!44E9155/7X-%DU4)(R@AI
MZ^CJZ1L8&AF;*)@*\\YF96\\#D_K-:2EA9V]C:V3LX.CDKZ+BXNK%#-?YW-_.P
M\\O3R]O'U\\P\\(# H6#0D-\"X^ 2/YGBXP*BHZ)C8M/2$Q*3G%62$U+%X Z]G]&
M9E9V3FY>?D%A47%R26E9E$=Y1258[C^3D&15=4UM77U#8U.S<DMI:UM[AV8G
M. C^=[EUMRH[]O3V]2=-2)XX2;%5='(H]Q2('-/4:6J3IB?-2)K9G*TT2T4U
M:_:<4&YIB-S_N7+S5)VJFZ=7SY\\X2V6!U<)%BY<LA9KYW]Q5?MGR%*453BV3
M5CJORA)+7;UF[3JH'/MZ%_'6T@T;-ZW<K&J5M67KMNT[!)BA<LP[U^S:G16\\
M9\\]>JWW[10_(IZTQ.W@($E7_+;BD#F\\3WZ*P;-F1H[.WSI'D/29P'!J+__\\?
MESUQV..DR*)3B[:J;SNM?49(V@(N%\\%VEK_#Y=PV^?9=PIE\\85.E(^\")X_]_
MCH.R8>=Y0S,OA&JGFV5T6B\"EF___#TE?7'M)ZO+E*]P[KQ[O0DY20);%M2FL
MUR]>O7B=[09:<@.QF2QDM-S=M2PP4^)_5(\":\"/%(84W7`)A(.MC?YL?R````
M)71%6'1#;VUM96YT`&-L:7 R9VEF('8N,\"XV(&)Y(%EV97,@4&EG=65T-G,[
-O ````!)14Y$KD)@@@``
`
end
" } ], "text_body": [ diff --git a/tests/legacy/050.txt b/tests/legacy/050.txt index efd09ff..e689bd0 100644 --- a/tests/legacy/050.txt +++ b/tests/legacy/050.txt @@ -141,19 +141,19 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "c_type": "multipart", "c_subtype": "related", "attributes": { - "boundary": "=====================_715546120==_.REL", - "type": "text/html" + "type": "text/html", + "boundary": "=====================_715546120==_.REL" } }, "others": { - "X-Mailer": [ - "QUALCOMM Windows Eudora Pro Version 4.2.0.58" - ], "X-Priority": [ "2 (High)" ], "X-Sender": [ "dwsauder@pop.example.com (Unverified)" + ], + "X-Mailer": [ + "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ] } }, diff --git a/tests/legacy/051.txt b/tests/legacy/051.txt index 7fee492..7fa3d63 100644 --- a/tests/legacy/051.txt +++ b/tests/legacy/051.txt @@ -197,14 +197,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } }, "others": { - "X-Sender": [ - "dwsauder@pop.example.com (Unverified)" - ], "X-Mailer": [ "QUALCOMM Windows Eudora Pro Version 4.2.0.58" ], "X-Priority": [ "2 (High)" + ], + "X-Sender": [ + "dwsauder@pop.example.com (Unverified)" ] } }, diff --git a/tests/legacy/052.txt b/tests/legacy/052.txt index df6fdc5..38b5f0d 100644 --- a/tests/legacy/052.txt +++ b/tests/legacy/052.txt @@ -58,23 +58,23 @@ welche also wohl noch ungl "X-MSMail-Priority": [ "Normal" ], + "X-MimeOLE": [ + "Produced By Microsoft MimeOLE V5.00.2314.1300" + ], + "X-Mailer": [ + "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" + ], "Importance": [ "Normal" ], "X-Priority": [ "3 (Normal)" - ], - "X-Mailer": [ - "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - ], - "X-MimeOLE": [ - "Produced By Microsoft MimeOLE V5.00.2314.1300" ] } }, "html_body": [ { - "contents": "Die Hasen und die Fr�sche\r
\r
Die Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\r
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r
Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der Tod\r
selbst. Auf, la�t uns ein f�r allemal sterben.\"\r
\r
In einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\r
allein das au�erordentliche Get�se und ihre wunderbare Gestalt erschreckte\r
eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs schnellste\r
untertauchten.\r
\r
\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\r
wenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\r
welche also wohl noch ungl�cklicher sein m�ssen als wir.\"\r
\r
" + "contents": "Die Hasen und die Fr�sche

Die Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der
Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der Tod
selbst. Auf, la�t uns ein f�r allemal sterben.\"

In einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;
allein das au�erordentliche Get�se und ihre wunderbare Gestalt erschreckte
eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs schnellste
untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein
wenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,
welche also wohl noch ungl�cklicher sein m�ssen als wir.\"

" } ], "text_body": [ diff --git a/tests/legacy/053.txt b/tests/legacy/053.txt index 45474fa..6e87883 100644 --- a/tests/legacy/053.txt +++ b/tests/legacy/053.txt @@ -69,8 +69,11 @@ als wir."=20 } }, "others": { - "X-Priority": [ - "3 (Normal)" + "X-MimeOLE": [ + "Produced By Microsoft MimeOLE V5.00.2314.1300" + ], + "X-MSMail-Priority": [ + "Normal" ], "X-Mailer": [ "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" @@ -78,11 +81,8 @@ als wir."=20 "Importance": [ "Normal" ], - "X-MSMail-Priority": [ - "Normal" - ], - "X-MimeOLE": [ - "Produced By Microsoft MimeOLE V5.00.2314.1300" + "X-Priority": [ + "3 (Normal)" ] } }, diff --git a/tests/malformed/001.txt b/tests/malformed/001.txt index df120a7..98231be 100644 --- a/tests/malformed/001.txt +++ b/tests/malformed/001.txt @@ -20,6 +20,11 @@ Content-Type: text/plain } } }, + "html_body": [ + { + "contents": "Content-Type: text/plain
" + } + ], "text_body": [ { "contents": "Content-Type: text/plain\n" diff --git a/tests/malformed/005.txt b/tests/malformed/005.txt index 3981bac..6376645 100644 --- a/tests/malformed/005.txt +++ b/tests/malformed/005.txt @@ -23,6 +23,11 @@ body2 } } }, + "html_body": [ + { + "contents": "body" + } + ], "text_body": [ { "header": { diff --git a/tests/malformed/009.txt b/tests/malformed/009.txt index 451023f..b54ca2f 100644 --- a/tests/malformed/009.txt +++ b/tests/malformed/009.txt @@ -27,6 +27,11 @@ Content-Type: text/plain } } }, + "html_body": [ + { + "contents": "1" + } + ], "text_body": [ { "header": { diff --git a/tests/malformed/010.txt b/tests/malformed/010.txt index 3850e8c..700139e 100644 --- a/tests/malformed/010.txt +++ b/tests/malformed/010.txt @@ -10,13 +10,42 @@ Content-Type: text/plain { "header": { "content_type": { - "c_type": "text", - "c_subtype": "plain" + "c_type": "message", + "c_subtype": "rfc822" } }, - "text_body": [ + "attachments": [ { - "contents": "1\n" + "Message": { + "header": { + "content_type": { + "c_type": "message", + "c_subtype": "rfc822" + } + }, + "attachments": [ + { + "Message": { + "header": { + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "html_body": [ + { + "contents": "1
" + } + ], + "text_body": [ + { + "contents": "1\n" + } + ] + } + } + ] + } } ] } \ No newline at end of file diff --git a/tests/malformed/011.txt b/tests/malformed/011.txt index 451023f..b54ca2f 100644 --- a/tests/malformed/011.txt +++ b/tests/malformed/011.txt @@ -27,6 +27,11 @@ Content-Type: text/plain } } }, + "html_body": [ + { + "contents": "1" + } + ], "text_body": [ { "header": { diff --git a/tests/malformed/012.txt b/tests/malformed/012.txt index 87a1921..5038485 100644 --- a/tests/malformed/012.txt +++ b/tests/malformed/012.txt @@ -42,6 +42,11 @@ Content-Type: text/plain "c_subtype": "plain" } }, + "html_body": [ + { + "contents": "1" + } + ], "text_body": [ { "contents": "1" diff --git a/tests/malformed/013.txt b/tests/malformed/013.txt index de5baec..f2d8cb0 100644 --- a/tests/malformed/013.txt +++ b/tests/malformed/013.txt @@ -43,6 +43,20 @@ hello, world } } }, + "html_body": [ + { + "contents": "hello, world" + }, + { + "contents": "hello, world" + }, + { + "contents": "hello, world" + }, + { + "contents": "hello, world" + } + ], "text_body": [ { "header": { diff --git a/tests/malformed/014.txt b/tests/malformed/014.txt index 244c32f..2c4a334 100644 --- a/tests/malformed/014.txt +++ b/tests/malformed/014.txt @@ -17,6 +17,11 @@ hello, world } } }, + "html_body": [ + { + "contents": "hello, world" + } + ], "text_body": [ { "header": { diff --git a/tests/malformed/015.txt b/tests/malformed/015.txt index f139522..0638034 100644 --- a/tests/malformed/015.txt +++ b/tests/malformed/015.txt @@ -60,12 +60,17 @@ invalid "c_type": "multipart", "c_subtype": "signed", "attributes": { - "micalg": "pgp-sha1", + "boundary": "=-GNQXLhuj24Pl1aCkk4/d", "protocol": "application/pgp-signature", - "boundary": "=-GNQXLhuj24Pl1aCkk4/d" + "micalg": "pgp-sha1" } } }, + "html_body": [ + { + "contents": "There was a day
a happy day
" + } + ], "text_body": [ { "header": { @@ -80,7 +85,7 @@ invalid ], "attachments": [ { - "File": { + "Binary": { "header": { "content_type": { "c_type": "application", diff --git a/tests/malformed/016.txt b/tests/malformed/016.txt index fb41cc1..7bb59bb 100644 --- a/tests/malformed/016.txt +++ b/tests/malformed/016.txt @@ -34,6 +34,11 @@ Content-Type: text/plain } } }, + "html_body": [ + { + "contents": "1
--1234567890123456789012345678901234567890123456789012345678901234567890123456789012
Content-Type: text/plain

22
--123456789012345678901234567890123456789012345678901234567890123456789012345678901
Content-Type: text/plain

333" + } + ], "text_body": [ { "header": { diff --git a/tests/thirdparty/000.txt b/tests/thirdparty/000.txt new file mode 100644 index 0000000..40ff327 --- /dev/null +++ b/tests/thirdparty/000.txt @@ -0,0 +1,63 @@ +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="bound" + +mime header + +--bound +Content-Transfer-Encoding: base64 +Content-Type: text/plain + +d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz +aWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk +Z2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE= +--bound +Content-Type: text/plain +Content-Transfer-Encoding: base64 + +ZWg= +--bound-- + +---- EXPECTED STRUCTURE ---- +{ + "header": { + "mime_version": "1.0", + "content_type": { + "c_type": "multipart", + "c_subtype": "alternative", + "attributes": { + "boundary": "bound" + } + } + }, + "html_body": [ + { + "contents": "we havea lot
of \u0000binary stuff in here
b adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a" + }, + { + "contents": "eh" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "base64", + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "we have\ra lot \nof \u0000binary stuff in here\nb adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a" + }, + { + "header": { + "content_transfer_encoding": "base64", + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "eh" + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/001.txt b/tests/thirdparty/001.txt new file mode 100644 index 0000000..7fd1b95 --- /dev/null +++ b/tests/thirdparty/001.txt @@ -0,0 +1,80 @@ +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="bound" + +mime header + +--bound +Content-Transfer-Encoding: binary +Content-Type: text/plain + +d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz +aWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk +Z2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE= +--bound +Content-Type: text/plain +Content-Transfer-Encoding: binary + +ZWg= +--bound +Content-Type: text/plain + +hello world + +--bound-- + +---- EXPECTED STRUCTURE ---- +{ + "header": { + "mime_version": "1.0", + "content_type": { + "c_type": "multipart", + "c_subtype": "alternative", + "attributes": { + "boundary": "bound" + } + } + }, + "html_body": [ + { + "contents": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz
aWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk
Z2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=" + }, + { + "contents": "ZWg=" + }, + { + "contents": "hello world
" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "binary", + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz\r\naWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk\r\nZ2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=\r" + }, + { + "header": { + "content_transfer_encoding": "binary", + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "ZWg=" + }, + { + "header": { + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "hello world\r\n\r" + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/002.txt b/tests/thirdparty/002.txt new file mode 100644 index 0000000..27ca32e --- /dev/null +++ b/tests/thirdparty/002.txt @@ -0,0 +1,85 @@ +Content-Type: multipart/mixed; boundary=foo + +--foo +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; charset=utf-8 + +p=C3=A4iv=C3=A4=C3=A4 + +--foo +Content-Transfer-Encoding: base64 +Content-Type: text/plain; charset=utf-8 + +ecO2dMOkIHZhYW4uCg== ignored +--foo +Content-Transfer-Encoding: base64 +Content-Type: text/plain; charset=utf-8 + +?garbage +--foo-- + +---- EXPECTED STRUCTURE ---- +{ + "header": { + "content_type": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "foo" + } + } + }, + "html_body": [ + { + "contents": "päivää
" + }, + { + "contents": "yötä vaan.
�\t�" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "quoted-printable", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "utf-8" + } + } + }, + "contents": "päivää\n" + }, + { + "header": { + "content_transfer_encoding": "base64", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "utf-8" + } + } + }, + "contents": "yötä vaan.\n�\t�" + } + ], + "attachments": [ + { + "Text": { + "header": { + "content_transfer_encoding": "base64", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "utf-8" + } + } + }, + "contents": "garbage" + } + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/003.txt b/tests/thirdparty/003.txt new file mode 100644 index 0000000..6d210c0 --- /dev/null +++ b/tests/thirdparty/003.txt @@ -0,0 +1,132 @@ +Content-Type: multipart/mixed; boundary="1" +MIME-Version: 1.0 + +--1 +Content-Transfer-Encoding: 7bit +Content-Type: text/plain; charset=us-ascii + +Move black king to queen's bishop + +--1 +Content-Transfer-Encoding: binary +Content-Type: text/plain; charset=UTF-8 + +Move ♚ to ♛'s ♝ + +--1 +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 + +Move ♚ to ♛'s ♝ + +--1 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; charset=UTF-8 + +Move =E2=99=9A to =E2=99=9B's =E2=99=9D + +--1 +Content-Transfer-Encoding: base64 +Content-Type: text/plain; charset=UTF-8 + +TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== + +--1-- + +---- EXPECTED STRUCTURE ---- +{ + "header": { + "mime_version": "1.0", + "content_type": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "1" + } + } + }, + "html_body": [ + { + "contents": "Move black king to queen's bishop
" + }, + { + "contents": "Move ♚ to ♛'s ♝
" + }, + { + "contents": "Move ♚ to ♛'s ♝
" + }, + { + "contents": "Move ♚ to ♛'s ♝
" + }, + { + "contents": "Move ♚ to ♛'s ♝
" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "7bit", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "us-ascii" + } + } + }, + "contents": "Move black king to queen's bishop\n" + }, + { + "header": { + "content_transfer_encoding": "binary", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move ♚ to ♛'s ♝\n" + }, + { + "header": { + "content_transfer_encoding": "8bit", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move ♚ to ♛'s ♝\n" + }, + { + "header": { + "content_transfer_encoding": "quoted-printable", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move ♚ to ♛'s ♝\n" + }, + { + "header": { + "content_transfer_encoding": "base64", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move ♚ to ♛'s ♝\n" + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/004.txt b/tests/thirdparty/004.txt new file mode 100644 index 0000000..adadd22 --- /dev/null +++ b/tests/thirdparty/004.txt @@ -0,0 +1,153 @@ +Content-Type: multipart/mixed; boundary="1" +MIME-Version: 1.0 + +--1 +Content-Transfer-Encoding: 6bit +Content-Type: text/plain; charset=UTF-8 + +Move black king to queen's bishop + +--1 +Content-Transfer-Encoding: 7bits +Content-Type: text/plain; charset=UTF-8 + +Move ♚ to ♛'s ♝ + +--1 +Content-Transfer-Encoding: 8 bit +Content-Type: text/plain; charset=UTF-8 + +Move ♚ to ♛'s ♝ + +--1 +Content-Transfer-Encoding: 7-bit +Content-Type: text/plain; charset=UTF-8 + +Move ♚ to ♛'s ♝ + +--1 +Content-Transfer-Encoding: 8-bit +Content-Type: text/plain; charset=UTF-8 + +Move ♚ to ♛'s ♝ + +--1 +Content-Transfer-Encoding: +Content-Type: text/plain; charset=UTF-8 + +Move =E2=99=9A to =E2=99=9B's =E2=99=9D + +--1-- + +---- EXPECTED STRUCTURE ---- +{ + "header": { + "mime_version": "1.0", + "content_type": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "1" + } + } + }, + "html_body": [ + { + "contents": "Move black king to queen's bishop
" + }, + { + "contents": "Move ♚ to ♛'s ♝
" + }, + { + "contents": "Move ♚ to ♛'s ♝
" + }, + { + "contents": "Move ♚ to ♛'s ♝
" + }, + { + "contents": "Move ♚ to ♛'s ♝
" + }, + { + "contents": "Move =E2=99=9A to =E2=99=9B's =E2=99=9D
" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "6bit", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move black king to queen's bishop\n" + }, + { + "header": { + "content_transfer_encoding": "7bits", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move ♚ to ♛'s ♝\n" + }, + { + "header": { + "content_transfer_encoding": "8 bit", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move ♚ to ♛'s ♝\n" + }, + { + "header": { + "content_transfer_encoding": "7-bit", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move ♚ to ♛'s ♝\n" + }, + { + "header": { + "content_transfer_encoding": "8-bit", + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move ♚ to ♛'s ♝\n" + }, + { + "header": { + "content_type": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } + } + }, + "contents": "Move =E2=99=9A to =E2=99=9B's =E2=99=9D\n" + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/005.txt b/tests/thirdparty/005.txt new file mode 100644 index 0000000000000000000000000000000000000000..4fb906eee0008fd12953c960f1328056653341df GIT binary patch literal 2708 zcmeHJ+iue^7|yky!pb$F>oiSM*H&_~tQ(?Y9q9yvsmj4?gPNpD+-?O`>H{FSf*0Us z+;ENdIva<_z=t^TM!R(g2_dZ)sbl{qfByXaG2@8fh#2-{h$}E04M;F_5>g6-Q|xa- zHy%a4lT2!QSqH7%mSr5^Bn{%I0?Q9q05FU)FlC6uiPB@77*^!Peh~F4&dCiMDFl44RDkz=F0KEMFj8rD*cXiy9JDAgRTM@K-rHJOv*^|hswxilHt zZll9?<2Bl8qg~V>sM$f@34L!`=xg`T$? z5v#%Mp}&~d>X^o(Jpf|=6&gN%5{@@k*Wz?58MVy*YP+^Xre%+@V{aQ900hz483aBh zhhZ@I3hM&H9A#NDwV8lBZC)$|8q z$rEJj5=y1qfx38dM$b8%x$wnwv#|JifO z>e2fo9CY2-pHQn8d`;|to# z865v*u#4Hd%da1Qe0Y0#e*XRJ^S3XbexA)PX7A_jmLhk=@nq7l0MBb2;XKL7kSR|W zXUfAs7uu5_bb+E|iaaV2O3v!62E~i{brt$>;kvrMfI=d!5I9zl)Hq2dwk`;zjBrRY2uyzgedY7K literal 0 HcmV?d00001 diff --git a/tests/thirdparty/006.txt b/tests/thirdparty/006.txt new file mode 100644 index 0000000..984d269 --- /dev/null +++ b/tests/thirdparty/006.txt @@ -0,0 +1,108 @@ +Subject: Hide and seek +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary=1 + +--1 +Content-Type: multipart/signed; protocol="signature/plain"; migalc="pen+paper"; boundary=2 +X-Signature-Type: penmanship + +--2 +Content-Type: multipart/alternative; boundary=3 + +--3 +Content-Type: text/html; charset=us-ascii + +Search me

Don't find me here

+ +--3 +Content-Type: text/plain +Content-Transfer-Encoding: binary + +Search me, and Find me here +--3-- + +--2 +Content-Type: signature/plain; charset=us-ascii + +Signed by undersigned +--2-- + +--1-- +---- EXPECTED STRUCTURE ---- +{ + "header": { + "mime_version": "1.0", + "subject": "Hide and seek", + "content_type": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "1" + } + } + }, + "html_body": [ + { + "header": { + "content_type": { + "c_type": "text", + "c_subtype": "html", + "attributes": { + "charset": "us-ascii" + } + } + }, + "contents": "Search me

Don't find me here

\n" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "binary", + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "Search me, and Find me here" + } + ], + "attachments": [ + { + "Binary": { + "header": { + "content_type": { + "c_type": "signature", + "c_subtype": "plain", + "attributes": { + "charset": "us-ascii" + } + } + }, + "contents": [ + 83, + 105, + 103, + 110, + 101, + 100, + 32, + 98, + 121, + 32, + 117, + 110, + 100, + 101, + 114, + 115, + 105, + 103, + 110, + 101, + 100 + ] + } + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/007.txt b/tests/thirdparty/007.txt new file mode 100644 index 0000000..7fce7f7 --- /dev/null +++ b/tests/thirdparty/007.txt @@ -0,0 +1,162 @@ +From: Moderator-Address +Content-Type: multipart/digest; boundary=1; + + +--1 + +From: someone-else +Subject: my opinion + +This is my opinion +--1 + +From: another one +Subject: i disagree + +Not agreeing one bit! +--1 + +From: attachment +Subject: funny hat +Content-Type: multipart/mixed; boundary=2 + +--2 +Content-Type: text/plain +Content-Transfer-Encoding: binary + +Lovely attachment for you +--2 +Content-Type: application/octet-stream; disposition=attachment; name="test.txt" +Content-Transfer-Encoding: binary + +Foobar +--2-- +--1-- +---- EXPECTED STRUCTURE ---- +{ + "header": { + "from": { + "Address": { + "name": "Moderator-Address", + "address": "moderator" + } + }, + "content_type": { + "c_type": "multipart", + "c_subtype": "digest", + "attributes": { + "boundary": "1" + } + } + }, + "attachments": [ + { + "Message": { + "header": { + "from": { + "Address": { + "name": "someone-else", + "address": "someone@else" + } + }, + "subject": "my opinion" + }, + "html_body": [ + { + "contents": "This is my opinion" + } + ], + "text_body": [ + { + "contents": "This is my opinion" + } + ] + } + }, + { + "Message": { + "header": { + "from": { + "Address": { + "name": "another one", + "address": "another@one" + } + }, + "subject": "i disagree" + }, + "html_body": [ + { + "contents": "Not agreeing one bit!" + } + ], + "text_body": [ + { + "contents": "Not agreeing one bit!" + } + ] + } + }, + { + "Message": { + "header": { + "from": { + "Address": { + "name": "attachment", + "address": "attachment@user" + } + }, + "subject": "funny hat", + "content_type": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "2" + } + } + }, + "html_body": [ + { + "contents": "Lovely attachment for you" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "binary", + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "Lovely attachment for you" + } + ], + "attachments": [ + { + "Binary": { + "header": { + "content_transfer_encoding": "binary", + "content_type": { + "c_type": "application", + "c_subtype": "octet-stream", + "attributes": { + "name": "test.txt", + "disposition": "attachment" + } + } + }, + "contents": [ + 70, + 111, + 111, + 98, + 97, + 114 + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/008.txt b/tests/thirdparty/008.txt new file mode 100644 index 0000000..5355085 --- /dev/null +++ b/tests/thirdparty/008.txt @@ -0,0 +1,181 @@ +From user@domain Fri Feb 22 17:06:23 2008 +From: user@domain.org +Date: Sat, 24 Mar 2007 23:00:00 +0200 +Mime-Version: 1.0 +Content-Type: multipart/mixed; boundary="foo bar" + +Root MIME prologue + +--foo bar +Content-Type: text/x-myown; charset=us-ascii + +hello + +--foo bar +Content-Type: message/rfc822 + +From: sub@domain.org +Date: Sun, 12 Aug 2012 12:34:56 +0300 +Subject: submsg +Content-Type: multipart/alternative; boundary="sub1" + +Sub MIME prologue +--sub1 +Content-Type: text/html + +

Hello world

+ +--sub1 +Content-Type: multipart/alternative; boundary="sub2" + +--sub2 +Content-Type: multipart/alternative; boundary="sub3" + +--sub3 + +sub3 text +--sub3 + +sub3 text2 +--sub3-- + +sub2 text +--sub2 + +sub2 text2 +--sub2-- +--sub1-- +Sub MIME epilogue + +--foo bar +Content-Type: text/plain + +Another part +--foo bar-- +Root MIME epilogue + + +---- EXPECTED STRUCTURE ---- +{ + "header": { + "date": { + "year": 2007, + "month": 3, + "day": 24, + "hour": 23, + "minute": 0, + "second": 0, + "tz_before_gmt": false, + "tz_hour": 2, + "tz_minute": 0 + }, + "from": { + "Address": { + "address": "user@domain.org" + } + }, + "mime_version": "1.0", + "content_type": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "foo bar" + } + }, + "others": { + "From user@domain Fri Feb 22 17": [ + "06:23 2008" + ] + } + }, + "html_body": [ + { + "contents": "Another part" + } + ], + "text_body": [ + { + "header": { + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "Another part" + } + ], + "attachments": [ + { + "Text": { + "header": { + "content_type": { + "c_type": "text", + "c_subtype": "x-myown", + "attributes": { + "charset": "us-ascii" + } + } + }, + "contents": "hello\n" + } + }, + { + "Message": { + "header": { + "date": { + "year": 2012, + "month": 8, + "day": 12, + "hour": 12, + "minute": 34, + "second": 56, + "tz_before_gmt": false, + "tz_hour": 3, + "tz_minute": 0 + }, + "from": { + "Address": { + "address": "sub@domain.org" + } + }, + "subject": "submsg", + "content_type": { + "c_type": "multipart", + "c_subtype": "alternative", + "attributes": { + "boundary": "sub1" + } + } + }, + "html_body": [ + { + "header": { + "content_type": { + "c_type": "text", + "c_subtype": "html" + } + }, + "contents": "

Hello world

\n" + }, + { + "contents": "sub3 text" + }, + { + "contents": "sub3 text2" + } + ], + "text_body": [ + { + "contents": "sub3 text" + }, + { + "contents": "sub3 text2" + }, + { + "contents": "sub2 text2" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/009.txt b/tests/thirdparty/009.txt new file mode 100644 index 0000000..2570882 --- /dev/null +++ b/tests/thirdparty/009.txt @@ -0,0 +1,312 @@ +Subject: In parts +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary=1 + +--1 +Content-Type: text/plain +Content-Transfer-Encoding: binary + +Hi, this is the fancy thing I was talking about! +--1 +Content-Type: Message/Partial; number=1; total=5; id="heks68ewe@example.org" + +X-Weird-Header-1: Bar +X-Weird-Header-2: Hello +Message-ID: +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: base64 + +dGhpcyBpcyB0aGUgZmlyc3QgcGFydCBvZiB0aGUgbWVzc2FnZQo= +--1-- + +---- EXPECTED STRUCTURE ---- +{ + "header": { + "mime_version": "1.0", + "subject": "In parts", + "content_type": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "1" + } + } + }, + "html_body": [ + { + "contents": "Hi, this is the fancy thing I was talking about!" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "binary", + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "Hi, this is the fancy thing I was talking about!" + } + ], + "attachments": [ + { + "Binary": { + "header": { + "content_type": { + "c_type": "message", + "c_subtype": "partial", + "attributes": { + "total": "5", + "number": "1", + "id": "heks68ewe@example.org" + } + } + }, + "contents": [ + 88, + 45, + 87, + 101, + 105, + 114, + 100, + 45, + 72, + 101, + 97, + 100, + 101, + 114, + 45, + 49, + 58, + 32, + 66, + 97, + 114, + 10, + 88, + 45, + 87, + 101, + 105, + 114, + 100, + 45, + 72, + 101, + 97, + 100, + 101, + 114, + 45, + 50, + 58, + 32, + 72, + 101, + 108, + 108, + 111, + 10, + 77, + 101, + 115, + 115, + 97, + 103, + 101, + 45, + 73, + 68, + 58, + 32, + 60, + 99, + 54, + 99, + 99, + 101, + 101, + 98, + 99, + 45, + 49, + 100, + 99, + 102, + 45, + 49, + 49, + 101, + 98, + 45, + 98, + 101, + 56, + 99, + 45, + 102, + 55, + 99, + 97, + 49, + 51, + 50, + 99, + 98, + 102, + 101, + 97, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 111, + 114, + 103, + 62, + 10, + 67, + 111, + 110, + 116, + 101, + 110, + 116, + 45, + 84, + 121, + 112, + 101, + 58, + 32, + 116, + 101, + 120, + 116, + 47, + 112, + 108, + 97, + 105, + 110, + 59, + 32, + 99, + 104, + 97, + 114, + 115, + 101, + 116, + 61, + 34, + 117, + 115, + 45, + 97, + 115, + 99, + 105, + 105, + 34, + 10, + 67, + 111, + 110, + 116, + 101, + 110, + 116, + 45, + 84, + 114, + 97, + 110, + 115, + 102, + 101, + 114, + 45, + 69, + 110, + 99, + 111, + 100, + 105, + 110, + 103, + 58, + 32, + 98, + 97, + 115, + 101, + 54, + 52, + 10, + 10, + 100, + 71, + 104, + 112, + 99, + 121, + 66, + 112, + 99, + 121, + 66, + 48, + 97, + 71, + 85, + 103, + 90, + 109, + 108, + 121, + 99, + 51, + 81, + 103, + 99, + 71, + 70, + 121, + 100, + 67, + 66, + 118, + 90, + 105, + 66, + 48, + 97, + 71, + 85, + 103, + 98, + 87, + 86, + 122, + 99, + 50, + 70, + 110, + 90, + 81, + 111, + 61 + ] + } + } + ] +} \ No newline at end of file diff --git a/tests/thirdparty/010.txt b/tests/thirdparty/010.txt new file mode 100644 index 0000000..65df86d --- /dev/null +++ b/tests/thirdparty/010.txt @@ -0,0 +1,44 @@ +Subject: =?UTF-8?B?44GT44KT44Gr44Gh44Gv?= +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary=1; comment="" + comment="人権の無視及" + +--1 +Content-Type: text/plain +Content-Transfer-Encoding: binary +Content-Language: ja + +人権の無視及 +--1-- +---- EXPECTED STRUCTURE ---- +{ + "header": { + "mime_version": "1.0", + "subject": "こんにちは", + "content_type": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "comment": "人権の無視及", + "boundary": "1" + } + } + }, + "html_body": [ + { + "contents": "人権の無視及" + } + ], + "text_body": [ + { + "header": { + "content_transfer_encoding": "binary", + "content_type": { + "c_type": "text", + "c_subtype": "plain" + } + }, + "contents": "人権の無視及" + } + ] +} \ No newline at end of file