cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-2050) MimeBodyPartInputStream never finishes reading certain streams
Date Thu, 19 Feb 2009 22:08:01 GMT

     [ https://issues.apache.org/jira/browse/CXF-2050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-2050.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.5
                   2.0.11


Your patch caused MANY tests to start failing as existing mime streams could no longer be
properly parsed. 

However, your test case was a big help and I've fixed to pass your test.    Thanks!

> MimeBodyPartInputStream never finishes reading certain streams
> --------------------------------------------------------------
>
>                 Key: CXF-2050
>                 URL: https://issues.apache.org/jira/browse/CXF-2050
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.4
>            Reporter: aaron pieper
>            Assignee: Daniel Kulp
>             Fix For: 2.0.11, 2.1.5
>
>         Attachments: MimeBodyPartInputStreamTest.java, patch.txt
>
>
> The MimeBodyPartInputStream class never finishes reading certain kinds of input streams
- it continues to read the same bytes over and over. One result of this issue is that the
AttachmentDeserializer enters an infinite loop when trying to deserialize a binary attachment,
so I would consider this an important issue.
> It appears that the problem has to do with how the end of the stream is read. First,
the MimeBody stream's read() method reads the to the end of the PushBack stream. Upon reaching
the end of the PushBack stream, the MimeBody stream's hasData() method unreads the last 15
bytes of the PushBack stream. The MimeBody stream's read() method returns 0, which signals
that more data needs to be read. This loop can happen over and over - the invoking code will
keep asking the MimeBody stream for more data, and the MimeBody stream will continue returning
0.
> The MimeBody stream should return -1 if there is no more data to be read - it does this
in most cases, but it doesn't handle this case for some reason.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message