[
https://issues.apache.org/jira/browse/MIME4J-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989099#comment-13989099
]
Howard Nguyen commented on MIME4J-238:
--------------------------------------
Hi Oleg,
Yes, I agree that it is not good idea. I am working on mm7 content forward
lock. For brief background, mm7 is using mime payload.
I have an example of mime body part of content-forward lock below. It is
essentially a wrapper multipart, with mimetype of
"application/vnd.oma.drm.message", of the actual content body part.
I was able to work around with mime4j 0.7.2 by using a secondary mime parser
with headless parsing feature and a fake generated content type.
I just create this "wishful" ticket in hope that I can get rid of the ugly work
around.
{code}
Content-Type: application/vnd.oma.drm.message; boundary="drm-boundary-409B8BD9"
Content-ID: base64_4.dm
Content-Location: base64_4.dm
--drm-boundary-409B8BD9
Content-Type: image/jpeg; name=scen2.jpg
Content-Location: scen2.jpg
Content-Transfer-Encoding: base64
/9j/4AAQSkZJRgABAAEAqgCqAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5j
... cut content down for relevance
--drm-boundary-409B8BD9--
{code}
http://stackoverflow.com/questions/4267899/drm-content-with-mm7-protocol-submit-request
> Add custom mimetype with multipart support
> ------------------------------------------
>
> Key: MIME4J-238
> URL: https://issues.apache.org/jira/browse/MIME4J-238
> Project: James Mime4j
> Issue Type: Wish
> Affects Versions: 0.8.0
> Reporter: Howard Nguyen
>
> Add custom mimetype with multipart support is basically not only mime type
> that start with "multipart/" signaling multipart. Of course, the Content-Type
> would still have "boundary" parameter. For example:
> {code}
> Content-Type: x-my-weird-application; boundary="Part_8_5123801.1399049231138"
> {code}
> You do this check in MimeUtil.isMultipart method.
> Is it possible to pass an interface MultipartChecker to through MimeConfig to
> MimeEntity so that in the following method so that we use it instead of
> MimeUtil
> {code}
> public EntityStateMachine advance() throws IOException, MimeException {
> ...
> case T_END_HEADER:
> ...
> } else if (MimeUtil.isMultipart(mimeType)) {
> state = EntityState.T_START_MULTIPART;
> clearMimePartStream();
> }
> ...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)