You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/01/04 02:28:54 UTC
[Bug 60550] New: MAPIMessage parser couldn't get "Content-ID" field.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60550
Bug ID: 60550
Summary: MAPIMessage parser couldn't get "Content-ID" field.
Product: POI
Version: 3.15-FINAL
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P2
Component: HSMF
Assignee: dev@poi.apache.org
Reporter: maoblackberry@gmail.com
Target Milestone: ---
Is it OK to add a few lines of code in AttachmentChunks.record() method:
// added an "else if" block to get CONTENT-ID field.
else if(chunkId == MAPIProperty.ATTACH_CONTENT_ID.id) {
attachContentId = (StringChunk) chunk;
}
Thanks.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60550] MAPIMessage parser couldn't get "Content-ID" field.
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60550
--- Comment #2 from maoblackberry@gmail.com ---
Created attachment 34585
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34585&action=edit
MSG messages with inline image attachments.
This attachments includes four inline images(attachments) with Content-ID
field.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60550] MAPIMessage parser couldn't get "Content-ID" field.
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60550
Javen O'Neal <on...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |enhancement
Status|NEW |NEEDINFO
--- Comment #1 from Javen O'Neal <on...@apache.org> ---
Sounds like a good idea!
Do you have a document (or does one our existing test documents [1]) have an
attach content id that we could use for a unit test?
Are you willing to modify an existing unit test or write up a new unit test so
we can verify the fix? See [2] or [3] for existing unit tests.
Also, what data type is attachContentId?
[1] HSMF test documents:
https://svn.apache.org/viewvc/poi/trunk/test-data/hsmf/
[2] HSMF unit tests
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/
and
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60550] MAPIMessage parser couldn't get "Content-ID" field.
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60550
--- Comment #6 from maoblackberry@gmail.com ---
Created attachment 34587
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34587&action=edit
test file for newly added test case testReadContentIDField()
A MSG file with 4 inline image attachments.
Each of them has a Content-ID field.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60550] MAPIMessage parser couldn't get "Content-ID" field.
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60550
--- Comment #3 from maoblackberry@gmail.com ---
Hi Javen,
Thanks for the quick response.
1.
I already attached a file which has four inline attachments.
2.
Sure, I would like to take a look at the existing unit tests and add a few more
accordingly.
Thanks again
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60550] MAPIMessage parser couldn't get "Content-ID" field.
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60550
--- Comment #4 from maoblackberry@gmail.com ---
(In reply to Javen O'Neal from comment #1)
> Sounds like a good idea!
>
> Do you have a document (or does one our existing test documents [1]) have an
> attach content id that we could use for a unit test?
>
> Are you willing to modify an existing unit test or write up a new unit test
> so we can verify the fix? See [2] or [3] for existing unit tests.
>
> Also, what data type is attachContentId?
>
> [1] HSMF test documents:
> https://svn.apache.org/viewvc/poi/trunk/test-data/hsmf/
> [2] HSMF unit tests
> http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/
> poi/hsmf/datatypes/ and
> http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/
> poi/hsmf/
Hi Javen,
Thanks for the response.
I think the data type of attachContentId should be:
public StringChunk attachContentId;
I already added a test case in TestFileWithAttachmentsRead.java
(testReadContentIDField()) and uploaded the java file and associated test
file(attachment_msg_inlineImg.msg) for you to review.
Thanks for the help.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60550] MAPIMessage parser couldn't get "Content-ID" field.
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60550
--- Comment #5 from maoblackberry@gmail.com ---
Created attachment 34586
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34586&action=edit
Java file with newly added test case
Added a new field:
private MAPIMessage inlineImgMsgAttachments;
it is initialized as :
this.inlineImgMsgAttachments = new
MAPIMessage(samples.openResourceAsStream("attachment_msg_inlineImg.msg"));
Added a new test case:
public void testReadContentIDField()
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60550] MAPIMessage parser couldn't get "Content-ID" field.
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60550
Javen O'Neal <on...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Javen O'Neal <on...@apache.org> ---
Thanks for the patch, unit test, and email message file.
Feel free to check out our contributor guidelines [1], which has some examples
of creating patches [2]. (a simple svn diff works too).
This will be available in 3.16 beta 2.
Applied to trunk in r1777428 and r1777429.
[1] https://poi.apache.org/guidelines.html#SubmittingPatches
[2]
https://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java?r1=1777428&r2=1777427&pathrev=1777428&view=patch
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org