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
parent
8bfdce6658
commit
01d83d8088
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue