-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
support display of format=flowed (rfc2646) #1835
Conversation
34dad0d
to
0754dce
Compare
@@ -36,6 +36,10 @@ public static void setBody(Part part, Body body) throws MessagingException { | |||
if (name != null) { | |||
contentType += String.format(";\r\n name=\"%s\"", name); | |||
} | |||
boolean isFlowed = MimeUtility.isFormatFlowed(part.getContentType()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support creating format=flowed
messages. It looks like this is only for the benefit of the new test in MessageViewInfoExtractorTest
. I'd rather have the test set the header after adding the body than adding to this already horrible method.
@@ -1137,4 +1140,11 @@ public static boolean isMessage(String mimeType) { | |||
public static boolean isSameMimeType(String mimeType, String otherMimeType) { | |||
return mimeType != null && mimeType.equalsIgnoreCase(otherMimeType); | |||
} | |||
|
|||
static boolean isFormatFlowed(String contentType) { | |||
if (TEXT_PLAIN.equalsIgnoreCase(getHeaderParameter(contentType, null))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracting the results of the getHeaderParameter()
calls to local variables should make this easier to read.
a85354d
to
a055ed4
Compare
What it says on the tin. This supports rfc2646 which specifies format=flowed, but not rfc3676 which adds the delsp parameter. That should be simple to add though.