Skip to content

DataStandardizer.File.InternetMessage 2.0.2

Choose a tag to compare

@github-actions github-actions released this 23 Nov 08:38
· 1 commit to develop since this release
d23d8d6

Breaking changes:

  • MboxWriter no longer reports a message that can't be read back with its options as LongBodyLine; the reader's error is thrown with its own kind, position and entity path.
  • ImfReader, ImfEntityReader, MboxReader, EmlxReader and MhtmlReader reject a line in a multipart entity that starts with its boundary and is not a delimiter, including the delimiters of a nested multipart entity whose boundary starts with the outer one, as ImfWriter already does (RFC 2046 §5.1.1).
  • A parameter given both as name and in an RFC 2231 form such as name* is now rejected as a duplicate (RFC 6838 §4.3), where the RFC 2231 value used to be kept.
  • Writers throw an ImfFileException for a multipart entity that was read with no close delimiter and hasn't changed, unless their options set AllowMissingBoundaryTerminator; ImfMessage.Validate reports it as InvalidBodyStructure.
  • ImfEntity.GetText throws ImfFileException for a text/html, text/xml, text/xml-external-parsed-entity or text/markdown entity with no charset parameter, instead of decoding it as US-ASCII. These types have no default character set (RFC 6657 §3), so read GetContent and find it as the format says.
  • ImfEntity.GetText throws ImfFileException for a text entity with the +xml suffix, such as text/foo+xml, and no charset parameter, instead of decoding it as US-ASCII. These types have no default character set (RFC 7303 §4.2), so read GetContent and find it as XML says.

Fixed:

  • The package now includes its XML documentation, so IntelliSense shows member descriptions.
  • VCard FLOAT and EMLX real values are read as the same double on .NET Framework as on .NET 10, including negative zero.
  • EmlxWriter, MboxWriter, and ImfWriter writing a message from an mbox file no longer alter the bytes of a body they would have labelled binary under AllowBinaryTransferEncoding; such a body is now encoded instead.
  • ImfWriter, MboxWriter and EmlxWriter writing a message that holds a message read from a file with other line breaks, such as one from an mbox or EMLX file being forwarded, now change its line breaks to those of the output, instead of refusing it or writing bare LF line breaks into a CRLF message.
  • ImfWriter, MboxWriter, EmlxWriter, ImfEntityWriter and ImfHeaderWriter now write a header field read from a file with other line breaks, such as one from an mbox file added to a message read from an .eml file, with the line breaks of the message, instead of writing bare LF line breaks into a CRLF message.
  • RFC 6533 message/global-headers, -delivery-status and -disposition-notification entities may be quoted-printable or base64.
  • A new UTF-8 header field no longer makes ImfMessage.Body, Validate or a Utf8 writer fail.
  • MboxReader no longer adds a stray line feed to the start of a message read after skipping part of a CRLF message.
  • ImfWriter adds MIME-Version to a message after a part of a multipart read without it changes.
  • MboxReader applies the line-length limit to quoted From lines correctly after 8-bit and CRLF lines.
  • MboxReader counts a carriage return that ends the file as part of a quoted From line.
  • Header text decoding (ImfHeaderText) decodes "Q"-encoded words with lower-case hexadecimal digits, such as =?UTF-8?Q?=c3=a9?=, by default, which RFC 2047 §4.2 allows; before, they were decoded only with ImfOptions.AllowMalformedEncodedWords.
  • Quoted parameter values accept the US-ASCII control characters that RFC 822 allows, as text or as quoted-pairs, instead of rejecting them.
  • Content-Type and Content-Disposition fields accept a quoted-pair whose backslash ends a folded line, such as filename="a\<CRLF> b", and read it as the space after the fold (RFC 5322 §2.2.3); before, the field was rejected.
  • EmlxPlistValue.TryGetDouble gives the nearest double for a hexadecimal integer too large for a long.
  • EmlxWriter, MboxWriter, MhtmlWriter, and ImfWriter writing a message from an mbox file no longer alter the CR and LF octets of a body that isn't text and that they would have labelled 7bit or 8bit; such a body is now encoded instead, and one that asks for 7bit or 8bit is refused.
  • Writers refuse a moved part or separately read message whose kept bytes hold a delimiter of a boundary around it.
  • A refusal of an entity inside a held message with other line breaks, such as one read from an mbox file, gives the EntityPath of that entity within the message being written, not within the held message.
  • The refusal of a binary entity, or one with an extension mechanism, whose line breaks would change gives its EntityPath.

Changed:

  • A text/* body from a forward-only stream, written as quoted-printable, has its bare LFs encoded as =0A instead of written as CRLF line breaks, so the content is kept as it is (RFC 2045 §6.7 rule 4).