You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Róbert Csákány (JIRA)" <ji...@apache.org> on 2009/12/15 23:53:18 UTC

[jira] Created: (SLING-1242) Observation get invalid content stream

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.


[jira] Updated: (SLING-1242) Observation get invalid content stream

Posted by "Róbert Csákány (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Róbert Csákány updated SLING-1242:
----------------------------------

          Component/s:     (was: API)
                       JCR
    Affects Version/s: Engine 2.0.6

> Observation get invalid content stream
> --------------------------------------
>
>                 Key: SLING-1242
>                 URL: https://issues.apache.org/jira/browse/SLING-1242
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: Engine 2.0.6
>         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.


[jira] Updated: (SLING-1242) Observation get invalid content stream

Posted by "Róbert Csákány (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Róbert Csákány updated SLING-1242:
----------------------------------

    Component/s:     (was: JCR)
                 Engine

> 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
>
> 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.