Apache OpenOffice (AOO) Bugzilla – Issue 83838
Extension can not download update from web site with WebDAV
Last modified: 2013-02-07 22:32:52 UTC
I have a Plone (www.plone.org) site that hosts updates to an extension. OpenOffice.org fails to download the extension update from the site while it can be downloaded with any browser by loading the URL that OpenOffice.org is complaining about. The server access logs show that OpenOffice.org does not send a GET HTTP request, but instead sends an OPTIONS request and a PROPFIND request after that. I have replicated sending these requests, and the problem is most likely that PROPFIND responds 401 Unauthorized. Actually WebDAV is disabled in this instance of Plone and that is why I guess it replies Unauthorized (and also because the computer with OpenOffice.org is not authorized anyway). I have looked around the code, and I guess ucb/source/ucp/webdav/webdavcontent.cxx is at fault. In particular in the getResourceType method it decides if a resource is an HTTP or a WebDAV resource by looking at the response to the OPTIONS request. Maybe it could be made more robust by not deciding on the resource type in advance, but first try to read the resource as if it were a WebDAV resource and if that fails fall back to reading it as an HTTP resource. (I'm not sure it can be done, I'm not very familiar with WebDAV at all.) Or the downloading code in UpdateInstallDialog::Thread::download() could altogether be changed to not use this overly clever ucb resource mechanism but instead simply download from the URL. I don't think looking for WebDAV resources makes sense in the case of downloading the update. (Of course once again I have very little idea about WebDAV, sorry if I'm completely wrong here.) Of course if you have some advice on how to configure the server to avoid this problem, that would be appreciated as well! For now I will just comment out this piece of code in Zope (the application server running Plone): # TODO: Most of the time, this is a lie. We not fully support # DAV 2 on all objects, so probably an interface check is needed. self.request.response.setHeader('DAV', '1,2', literal=True) Funny, eh? :) Both OpenOffice.org and Plone work well with other software that does not support WebDAV, but they fail with each other, because they both have flaky support for it...
In defense of Plone/Zope: It looks like they acted on the TODO, because commenting out that line did nothing -- instead a similar line was found in a more complicated file that indeed (I think) does interface checks. If anyone else encounters this problem, the file is: Zope/lib/python/webdav/Resource.py
Created attachment 55412 [details] Patch to make webdav work on Mac OSX
For those who want to try the patch on an Mac OSX install, here is a built version: http://www.ludovic.org/xwiki/bin/download/Main/OOPatch/libunosal.dylib.3 It replaces the one in /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib It works as a replacement to the one in OO 3.0b2 (BEB300m3 build 9328)
oops... forget my patch and last comment.. this was for bug 81536. If some admin can delete them please do.