[
https://jira.nuxeo.org/browse/NXP-5171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=75555#action_75555
]
Sean Radford commented on NXP-5171:
-----------------------------------
This is caused by the logic in the server WebDAV PUT method:
if (alreadyExist) {
URLResolverCache.removeFromCache(existingDoc);
session.removeDocument(existingDoc.getRef());
}
boolean overwrite = davRequest.getHeaderOverwrite();
I think that a better implementation would be:
boolean overwrite = false;
if (alreadyExist) {
URLResolverCache.removeFromCache(existingDoc);
overwrite = true;
}
Passing overwrite of true when the document currently exists, causes
DefaultFileImporter#create(..) to generate a new minor version (and snapshot).
In addition, examining and acting on the 'Overwrite' header is incorrect, as
per the WebDAV spec (see section 10.6) this is for a COPY of MOVE operation.
> WebDAV and overwritting a document
> ----------------------------------
>
> Key: NXP-5171
> URL: https://jira.nuxeo.org/browse/NXP-5171
> Project: Nuxeo Enterprise Platform
> Issue Type: Bug
> Affects Versions: 5.3.1
> Reporter: Sean Radford
> Priority: Major
>
> When over-writing a file using WebDAV the existing file information is
> completely lost.
> For example if I open a document that is version 2.0 in Open Office, make
> some changes and save it the document then reverts back to 1.0.
> It should (at the least) remain at version 2.0
> The same result is seen by using the webdav KDE kioslave to copy a file into
> a server directory that already contains a copy of the file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets