I am trying to concurrently edit a Word document stored in ModeShape:
1. As user1: open the Word document stored in ModeShape, do some modifications in it, save it, but don't close it yet
2. As user2: open the Word document stored in ModeShape, choose the "Edit the file and merge your changes" option, do some modifications in it but don't save yet
3. As user1: close the Word document
4. As user2: save the Word document and close it
I now get an upload failed error and in the log I see:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1 in org.modeshape.webdav.methods.AbstractMethod.getLockIdFromIfHeader(AbstractMethod.java:278)
I have debugged this, and it seems that in this case the lock token has an ETag in it:
which causes the above-mentioned exception.
I suppose this ETag should be taken into account when locking so that the merge of the two document versions is done correctly.