Observation get invalid content stream --------------------------------------
Key: SLING-1242
URL: https://issues.apache.org/jira/browse/SLING-1242
Project: Sling
Issue Type: Bug
Components: API
Environment: OSX 10.6 SUN JDK 1.5.0_17
Reporter: Róbert Csákány
I made an observer which processing the uploaded nodes. I found an interesting
bug.
I'm uploading a binary file over WEBDAV.
OnEvent I get the Event.NODE_ADDED
Node addedNode = session.getRootNode().getNode(event.getPath().substring(1));
reading data from addedNode.getProperty("jcr:data").getStream();
When I'm in debug mode, and the breakpoint is set before the reading the
stream, the stream data is correct, there is the exact data - same as upload.
But, when I'm not debugging, the following data is presented in the
InputStream:
<?xml version="1.0" encoding="utf-8"?>
<D:propfind xmlns:D="DAV:">
<D:prop>
<D:getlastmodified/>
<D:getcontentlength/>
<D:resourcetype/>
</D:prop>
</D:propfind>
I can reproduce the problem.
Another info - maybe related with this - when I create a 0 byte file from
webdav, when I read it's not empty:
<?xml version="1.0" encoding="utf-8"?>
<D:propfind xmlns:D="DAV:">
<D:prop>
<D:getlastmodified/>
<D:getcontentlength/>
<D:resourcetype/>
</D:prop>
</D:propfind>
I think the two problem have same root.
I use the SVN Trunk version: 890897
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
