Skip to content

Commit

Permalink
Fixed parser logic for determining if a message/rfc822 part is encoded
Browse files Browse the repository at this point in the history
Should theoretically fix issue #1049
  • Loading branch information
jstedfast committed Jun 26, 2024
1 parent 58cbe41 commit 0877432
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MimeKit/ParserOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ internal static bool IsEncoded (ContentEncoding encoding)
case ContentEncoding.SevenBit:
case ContentEncoding.EightBit:
case ContentEncoding.Binary:
case ContentEncoding.Default:
return false;
default:
return true;
Expand All @@ -285,7 +286,8 @@ static bool IsEncoded (IList<Header> headers)
if (headers[i].Id != HeaderId.ContentTransferEncoding)
continue;

MimeUtils.TryParse (headers[i].Value, out ContentEncoding encoding);
if (!MimeUtils.TryParse (headers[i].Value, out ContentEncoding encoding))
return false;

return IsEncoded (encoding);
}
Expand Down

0 comments on commit 0877432

Please sign in to comment.