[ 
https://issues.apache.org/jira/browse/JCR-3994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15372723#comment-15372723
 ] 

Mario S. Mommer commented on JCR-3994:
--------------------------------------

I added to line 123 in file XmlHandler.java (org.apache.jackrabbit.server.io) 
the following line:

            contentNode.setProperty(JcrConstants.JCR_DATA, 
context.getInputStream());

and now it the contents can be retrieved via GET. Is this a reasonable fix?

The context looks like this:

[...]
        try {
            contentNode.getSession().importXML(contentNode.getPath(), in, 
uuidBehavior);
            contentNode.setProperty(JcrConstants.JCR_DATA, 
context.getInputStream()); // Add contents to node
                                                                                
                                                          // as JCR_DATA 
property
        } finally {
[...]

> WebDAV XML import truncates file contents.
> ------------------------------------------
>
>                 Key: JCR-3994
>                 URL: https://issues.apache.org/jira/browse/JCR-3994
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-standalone
>    Affects Versions: 2.12.2
>         Environment: Debian Jessie
>            Reporter: Mario S. Mommer
>
> An XML file imported to the standalone webdav server (2.12.2) will have no 
> content when retrieved.
> To reproduce:
> * start jackrabbit-standalone-2.12.2.jar in an empty directory, where it 
> creates the default repository.
> * Upload a well-formed XML file using e.g. cadaver.
> * Go with a browser to http://localhost:8080/repository/default/ where the 
> file should be visible.
> * Click on the file, see it's empty.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to