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

Really handle an empty part with Angstrom.peek #68

Merged
merged 1 commit into from
Jun 29, 2021
Merged

Conversation

dinosaure
Copy link
Member

It seems about an old code an my previous equivalent implementation of angstrom when I was able to handle such case (with too many complexity). We try to really check if we can get the boundary just after the header with peek and if it's not the case, we just consume \r\n and say that we have something then.

The complexity is about the same prefix between \r\n and the boundary which begins with \r\n. This fix try to really recognize an empty part so.

@dinosaure dinosaure merged commit 57b88f9 into master Jun 29, 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 handle-none-part branch January 16, 2022 18:53
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