You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2023/04/13 05:00:00 UTC
[jira] [Resolved] (SLING-1242) Observation get invalid content stream
[ https://issues.apache.org/jira/browse/SLING-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-1242.
-------------------------------------
Resolution: Won't Fix
> Observation get invalid content stream
> --------------------------------------
>
> Key: SLING-1242
> URL: https://issues.apache.org/jira/browse/SLING-1242
> Project: Sling
> Issue Type: Bug
> Components: Engine
> Affects Versions: Engine 2.0.6
> Environment: OSX 10.6 SUN JDK 1.5.0_17
> Reporter: Róbert Csákány
> Priority: Major
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)