Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing RFC822 parsers #689

Closed
wants to merge 2 commits into from

Conversation

Davidde94
Copy link
Collaborator

Resolves #664

We were missing parsers for RFC822, RFC822.HEADER, and RFC822.TEXT.

Added parser with tests.

Copy link
Collaborator

@danieleggert danieleggert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intentionally not added — but we should probably call out in the documentation why:

RFC822 is functionally equivalent to BODY[], and I’d argue that we should just return it as such, e.g. treat a RFC822 in the response as a BODY[] response.

Similarly RFC822.HEADERmaps to BODY.PEEK[HEADER] and RFC822.TEXT maps to BODY[TEXT].

These exist in the IMAP specs for historical reasons — old IMAP standards (pre version 4) had these, and that historical luggage was kept, while adding the more flexible BODY… attributes. For NIOIMAP, we should just always use BODY….

@danieleggert
Copy link
Collaborator

When receiving RFC822.TEXT NIL, we should treat that as being BODY[TEXT] NIL.

@Davidde94 Davidde94 force-pushed the de/fix-parse-rfc822text-nil branch from a25a69f to b91bb8b Compare February 21, 2022 07:11
@Davidde94
Copy link
Collaborator Author

I'm a little confused, let's discuss offline

@Davidde94
Copy link
Collaborator Author

@swift-server-bot test this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't parse RFC822.TEXT NIL
2 participants