Use BODY instead of RFC822

RFC3501 seems to prefer BODY attributes as the more modern equivalent
to RFC822. For example, this also allows us to use BODY.PEEK. Since the
fetch methods in melib are tightly coupled with the parser, we have to
add this here if we want to use BODY attributes during fetch.
imap-connection-changes
Andrei Zisu 3 years ago committed by Manos Pitsidianakis
parent bc11705e85
commit 1a4384db08
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -624,8 +624,8 @@ pub fn fetch_response(input: &[u8]) -> ImapParseResult<FetchResponse<'_>> {
String::from_utf8_lossy(input)
))));
}
} else if input[i..].starts_with(b"RFC822 {") {
i += b"RFC822 ".len();
} else if input[i..].starts_with(b"BODY[] {") {
i += b"BODY[] ".len();
if let Ok((rest, body)) =
length_data::<_, _, (&[u8], nom::error::ErrorKind), _>(delimited(
tag("{"),

Loading…
Cancel
Save