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

Clarify the semantic about the underlying quoted-printable encoder #84

Merged
merged 1 commit into from
Sep 6, 2021

Conversation

dinosaure
Copy link
Member

This patch is a bit big about implication but I think it's the better way about the quoted-printable encoding. It considers that the given stream which will be encoded with pecu considers any chunks of it as a line. It solves one issue about the expected last \r\n in the body (whatever the contents of the stream) and precise a more systemic behavior which corresponds to the real use-case of the quoted-printable encoding - transmit a text, regardless the newline convention of the host system.

About isomorphism, it changes a bit the test when we must systematically append a newline for any chunks emitted and we still are able to generate a million of emails which can be decoded/encoded safely without any problems.

/cc @lyrm who knows about that.

@dinosaure dinosaure merged commit 39dc147 into master Sep 6, 2021
dinosaure added a commit to dinosaure/opam-repository that referenced this pull request Oct 18, 2021
CHANGES:

- Replace deprecated functions of `fmt` library (@dinosaure, mirage/mrmime#86)
- Fix OPAM constraints (@kit-ty-kate, @dinosaure, mirage/mrmime#85)
- Clarify the semantic about the underlying quoted-printable encoder (@dinosaure, mirage/mrmime#84)
- Be able to pass the seed to generate the boundary (@dinosaure, mirage/mrmime#83)
- Let the user to decide if it wants to encode or not the given stream
  according to the `Content-Transfer-Encoding` (@dinosaure, mirage/mrmime#82)
- Add `Content_type.Type.of_string` (@dinosaure, mirage/mrmime#81)
- Add `Header.add_unless_exists` (@dinosaure, mirage/mrmime#81)
- Add a regression test about mirage/mrmime#77 (@lyrm, @dinosaure, mirage/mrmime#78)
- Fix bug on the Base64 decoder (@clecat, @lyrm, @dinosaure, mirage/mrmime#78)
- Don't try to split quoted-printable and add useless spaces to respect isomorphism (@dinosaure, @lyrm, mirage/mrmime#77)
- Fix how we escape `\b` in content-type parameters (@dinosaure, mirage/mrmime#73)
- Add `Header.{length,to_list,of_list,to_list_with_location}` (@dinosaure, mirage/mrmime#72)
- Enable `fws` token in quoted-string values (as a parameter of the content-type) (@lyrm, @dinosaure, mirage/mrmime#71)
- Handle correctly an empty part with `angstrom` (@dinosaure, mirage/mrmime#68)
- Generate a corpus of a million emails where we ensure that
  `mrmime` assumes a kind of _isomorphism_, see https://github.com/mirage/hamlet
  for more details (@lyrm, @dinosaure, mirage/mrmime#67)
- Fix some comparison functions (on IANA values and field-name) (@lyrm, @dinosaure, mirage/mrmime#66)
- Simplify the `Mail.t` type (@lyrm, @dinosaure, mirage/mrmime#63)
- Fix pattern-matching failure when decoder is closed (@dinosaure, mirage/mrmime#62)
- Keep the order of fields into a header when we replace one (@dinosaure, mirage/mrmime#61)
- Ensure stable memory with lwt when we parse contents (@dinosaure, mirage/mrmime#60)
- Fix how we parse quoted-printable contents (@dinosaure, mirage/mrmime#59)
- Add a space in front of any field's values (@dinosaure, mirage/mrmime#56)
- Ensure to emit only lines (@dinosaure, mirage/mrmime#55)
- Fix how we parse Content-Transfer-Encoding (@dinosaure, mirage/mrmime#54)
- Better pretty-print multiple domains on mailbox (@dinosaure, mirage/mrmime#53)
- Unlock the arbitrary limit on the internal buffer to decode the header (@dinosaure, mirage/mrmime#51)
- Delete unused phrases field value (@dinosaure, mirage/mrmime#50)
- Fix fuzzer (@dinosaure, mirage/mrmime#49)
@dinosaure dinosaure deleted the quoted-printable branch January 16, 2022 18:52
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.

1 participant