[
https://issues.apache.org/jira/browse/JCR-3994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15380867#comment-15380867
]
Mario S. Mommer edited comment on JCR-3994 at 7/16/16 6:09 PM:
---------------------------------------------------------------
This patch resolves the issue, it seems. The problem was that the XML was
imported as application/xml, but the XmlHandler only declared itself competent
for files of type text/xml when exporting.
---
a/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java
+++
b/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java
@@ -171,7 +171,7 @@
} catch (RepositoryException e) {
// ignore and return false
}
- return XML_MIMETYPE.equals(mimeType);
+ return supportedTypes.contains(mimeType);
}
return false;
}
was (Author: msmommer):
This patch resolves the issue, it seems. The problem was that the XML was
imported as application/xml, but the XmlHandler only declared itself competent
for files of type text/xml.
---
a/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java
+++
b/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java
@@ -171,7 +171,7 @@
} catch (RepositoryException e) {
// ignore and return false
}
- return XML_MIMETYPE.equals(mimeType);
+ return supportedTypes.contains(mimeType);
}
return false;
}
> 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)