fix multi-line subject encoding and introduce MIME debugging env var

This commit is contained in:
holger krekel
2019-12-05 10:13:14 +01:00
parent c4de0f3b17
commit ec81d29580
8 changed files with 61 additions and 6 deletions

View File

@@ -23,7 +23,8 @@ pub fn dc_encode_header_words(input: impl AsRef<str>) -> String {
}
fn must_encode(byte: u8) -> bool {
static SPECIALS: &[u8] = b",:!\"#$@[\\]^`{|}~=?_";
// XXX do we need to put ":" in here?
static SPECIALS: &[u8] = b",!\"#$@[\\]^`{|}~=?_";
SPECIALS.iter().any(|b| *b == byte)
}