问题
I've implemented WebDAV server using WebDAV-Servlet. I open a document by through WebDAV and I make a change on it,when I want to save the document, word alert me that this document changed by another user while no one had edited this document. I don't understand the problem. Who has edited this document? Is there any problem with my Lock implementation?
回答1:
After a while I found out the solution.
The root cause of this problem is changing lastmodified date between lock and unlock requests. last modifieddate and createddate will combine in numeral form. Then this numeric will be inserted into Head request, response which call "Etag". in my caste it's like ETag: W/"1234--9223372036854775808" Microsoft word will get Etag value and will insert it in If-None-Match request header. The Etag value If-None-Match should be same else ms word suppose the word content had changed so the combine alert is ms word will show.
Another point is that you should add your website in trusted site. If you don't do this an alert will raise before word opens.
来源:https://stackoverflow.com/questions/61248151/ms-word-prevents-edit-protected-document-because-word-says-document-changed-by-a