[
https://issues.apache.org/jira/browse/MIME4J-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483603#comment-16483603
]
ASF GitHub Bot commented on MIME4J-270:
---------------------------------------
GitHub user dmak opened a pull request:
https://github.com/apache/james-mime4j/pull/18
MIME4J-270 Using "alternative" as default subtype.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dmak/james-mime4j MIME4J-270
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/james-mime4j/pull/18.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18
----
commit c33617db27d2c31825946706c91843f3cfbadce5
Author: Dmitry Katsubo <dmitry.katsubo@...>
Date: 2018-05-22T07:42:07Z
MIME4J-270 Using "alternative" as default subtype.
----
> MultipartBuilder creates message with null subtype
> --------------------------------------------------
>
> Key: MIME4J-270
> URL: https://issues.apache.org/jira/browse/MIME4J-270
> Project: James Mime4j
> Issue Type: Improvement
> Components: dom
> Affects Versions: 0.8.1
> Reporter: Dmitry Katsubo
> Priority: Minor
> Attachments: james-mime4j.patch
>
>
> JavaDoc of
> [{{MultipartBuilder#getSubType()}}|https://github.com/apache/james-mime4j/blob/6c31bd1e8f8b97cc432bbf9580e7383f00de1506/dom/src/main/java/org/apache/james/mime4j/message/MultipartBuilder.java#L75]
> reads:
> {quote}Gets the multipart sub-type. E.g. {{alternative}} (the default) or
> {{parallel}}. See RFC 2045 for common sub-types and their meaning.
> {quote}
> however builder creates multipart with {{null}} subtype:
> {code:java}
> Multipart multipart = MultipartBuilder.create().build();
> new DefaultMessageWriter().writeMessage(multipart, System.out);
> {code}
> outputs:
> {code:java}
> MIME-Version: 1.0
> Content-Type: multipart/null;
> boundary="-=Part.0.c3f59e98561a68df.16251ed82a4.feee6e1cf64afde8=-"
> {code}
> Expected that builder is initialized with some default subtype.
> More over subtypes are listed in RFC *2046* (not in 2045):
> * [Alternative Subtype|https://tools.ietf.org/html/rfc2046#section-5.1.4]
> * [Parallel Subtype|https://tools.ietf.org/html/rfc2046#section-5.1.6]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)