[
https://issues.apache.org/jira/browse/CAMEL-12078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332270#comment-16332270
]
ASF GitHub Bot commented on CAMEL-12078:
----------------------------------------
GitHub user tdudgeon opened a pull request:
https://github.com/apache/camel/pull/2185
Failing test for CAMEL-12078
This PR provides a failing test for CAMEL-12078.
It shows that the DataSource for an attachment is read twice.
The test to look at is MimeMultipartDataFormatTest.attachmentReadOnce()
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tdudgeon/camel master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/2185.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 #2185
----
commit 721b9851f5537a22b5353a2f7c5da62d8bcfe766
Author: Tim Dudgeon <tdudgeon@...>
Date: 2017-12-12T17:51:05Z
failing test for CAMEL-12078
commit 0fcd0b28865e424871975f80073cfc3dd887f337
Author: Tim Dudgeon <tdudgeon@...>
Date: 2018-01-19T08:40:39Z
Merge branch 'master' of https://github.com/apache/camel
commit 3350601da20d02d439b6d0cbbb639871988c66ce
Author: Tim Dudgeon <tdudgeon@...>
Date: 2018-01-19T13:38:48Z
Merge branch 'master' of https://github.com/apache/camel
----
> MIME-Mutipart DataFormat reads attachment DataSource twice
> ----------------------------------------------------------
>
> Key: CAMEL-12078
> URL: https://issues.apache.org/jira/browse/CAMEL-12078
> Project: Camel
> Issue Type: Bug
> Components: camel-mail
> Affects Versions: 2.20.1
> Reporter: Tim Dudgeon
> Priority: Minor
> Fix For: 2.21.0
>
>
> As reported on mailing list if an attachment for MIME-Mutipart DataFormat is
> defined using a DataSource that can only be read once you get an exception.
> http://mail-archives.apache.org/mod_mbox/camel-users/201712.mbox/%3C0e0d4b2e-dc32-c61e-3ccd-7ee14238c485%40gmail.com%3E
> For instance, this happens if the DataSource is created using an InputStream
> that cannot be read multiple times
> It should be possible to post the data only reading the input a single time.
> I will add a test case shortly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)