Apache OpenOffice (AOO) Bugzilla – Issue 126305
WebDAV lock on 4.1.1 does not work
Last modified: 2016-08-30 21:33:15 UTC
When serf library was added to AOO, the WebDAV lock file feature was not implemented. To check it, you should have a WebDAV server available, on which the lock feature is enabled. This can be achieved on both Linux or Windows 7 Professional, instruction to do this can be found on the Internet. On Windows 7 Professional only the Basic authentication will work, current AOO serf version does not have Windows authentication. Try to access the same file on the WebDAV server with AOO 4.1.1 from two different PC at the same time and both of them will permit modification of the file. I'll attach a patch that implements the WebDAV lock, only for files, WebDAV lock on containers (directory) is not implemented. The implementation is according to RFC4918, plus errata. The main project where the changes are located is ucb.
Created attachment 84738 [details] Add lock functionality to WebDAV, according to RFC4918 The patch is rebased on trunk, r1678268. I added the placeholder '//->i126305' where changes where made in ucb client applications (sfx2, ucbhelper, comphelper, offapi), I didn't do that in ucb, where the changes are substantial. Other placeholder are 'i12605 TODO' something that works but I'm not sure I did the right choice, in this case suggestions welcome. The patch was built successfully both on Linux (Ubuntu 14.04 64bit) and Windows (Windows 7 64bit).
See issue 126312 for a better use in some Windows installation where Windows authentication is needed. See issue 125194 for an issue with roots in WebDAV lock problem, but solved in another way.
Created attachment 84784 [details] Proposed patch to fix the issue, version #2 The patch is rebased on trunk, r1683442. It completely replaces the former one. I added the placeholder '//->i126305' where changes where made (sfx2, ucbhelper, comphelper, offapi, ucb). The patch was built successfully both on Linux (Ubuntu 14.04 64bit) and Windows (Windows 7 64bit). Changes from the previous patch version: - fixed a regression while doing copy/paste among AOO application; - added a correct refresh of the document while turning it to r/w from r/o (e.g. when the other user releases the lock on the WebDAV resource). This same refresh is operating even when you try to switch from r/o to r/w and the document is reported as still locked, so the user can see the current document state; - corrected a wrong behaviour existent in AOO 4.1.1, where the edit button on toolbar stop functioning after you try it several time and the file is still locked by another user; - shortened the refresh time of the lock because some WebDAV servers even though they are HTTP/1.1 after some time they return an error that is mapped by serf to 'connection closed by peer'. Time was reduced from 3 minutes down to 2 minutes to solve the problem. - removed some unused white spaces while I was at it... In my own opinion, this patch should be evaluated to be added to AOO 4.1.2 version.
Setting target 4.1.2 as per discussions in mailing list and issue comments.
Created attachment 84822 [details] Proposed patch to fix the issue, version #3 Updated version of the patch. Fixes a small error in protocol testing in framework that prevented correct checking against https:// protocol. Polished the comment a little. IMHO it ca be used for inclusion in trunk, rebased on trunk r1687177.
Nominating as blocker for OpenOffice 4.1.2. This is the second patch in a set of three patches that, combined, solve a major interoperability (Sharepoint) bug.
The proposed patch could have regressions because was tested only with a limited set of WebDAV servers.
"pescetti" committed SVN revision 1705200 into branches/AOO410: #i126305# Fix typo that prevents merging from trunk.
"pescetti" committed SVN revision 1705199 into trunk: #i126305# Add support for WebDAV locking.
"pescetti" committed SVN revision 1705201 into branches/AOO410: #i126305# Add support for WebDAV locking.
"pescetti" committed SVN revision 1705247 into branches/AOO410: #i126305# Temporary revert build breaker (limited to the AOO410 branch).
Apparently this breaks the build in AOO410 (offapi module), so it's temporarily reverted until it can be checked better. It remains fixed on trunk, where build is OK.
"pescetti" committed SVN revision 1705276 into trunk: #i126305# Add missing files from the patch.
"pescetti" committed SVN revision 1705278 into branches/AOO410: #i126305# Apply the full WebDAV patch.
Build issues were due to an incomplete commit. The patch has now been applied properly to AOO410 for OpenOffice 4.1.2.
Created attachment 84961 [details] patch to unbreak the FreeBSD port build after the proposed patch was committed This change broke the FreeBSD port build, which uses --with-system-apr and --with-system-serf. The attached patch fixes this problem, and builds of trunk without these two options are also successful on FreeBSD.. A similar change was made to trunk in r1654282 to fix other files under webdav.
A different version of Don's patch has been committed to trunk and merged to AOO410 by pfg. Relevant commits for tracking: http://svn.apache.org/r1705542 http://svn.apache.org/r1705543 http://svn.apache.org/r1705547
The current trunk and AOO410 have the patch by Giuseppe and the following build fixes by Don. Adjusted by pfg with http://svn.apache.org/r1705551 (trunk) http://svn.apache.org/r1705552 (AOO410)
Reopening due to the (easy) fix proposed on the dev list: http://www.mail-archive.com/dev@openoffice.apache.org/msg25156.html Giuseppe, are you going to implement the change yourself? Due to the nature of this change, a patch with respect to the current trunk would be best.
Created attachment 84971 [details] Move an added enum as the last one The proposed patch move the new enum to the last position.
Created attachment 84972 [details] Path to fix access to non webdav sites This patch fix access to web site not implementing webdav or to site that are read-only webdav.
Both patches by Giuseppe are now committed to trunk and to AOO410 for OpenOffice 4.1.2.
Verified in Linux (64bit) and Windows (32bit): found fixed.
Thanks, setting VERIFIED after we got confirmation on list that 4.1.2-RC2 Mac OS X works too.
Closing.