email/parser: do not set has_colon newline

When parsing a field-name, and expecting a colon (:) if a newline is
first encountered do not set `has_colon` flag to true.
master
Manos Pitsidianakis 2020-06-20 11:13:50 +03:00
parent 8bfdce6658
commit 01d83d8088
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 5 additions and 1 deletions

View File

@ -405,11 +405,15 @@ pub mod headers {
name = &input[0..i];
ptr = i + 2;
break;
} else if *x == b':' || *x == b'\n' {
} else if *x == b':' {
name = &input[0..i];
has_colon = true;
ptr = i;
break;
} else if *x == b'\n' {
name = &input[0..i];
ptr = i;
break;
} else if is_ctl_or_space!(*x) {
return Err(nom::Err::Error((
input,