[Zope-Coders] RFC: Remove funky WebDAV hackery?

Chris Withers chrisw@nipltd.com
Sat, 10 Aug 2002 10:50:26 +0100


Tres Seaver wrote:
> There are at least three places in the Zope2 source tree which make
> weird changes to the response object, presumably to support flaky
> Borg-ish clients.
> 
>   ZServer/HTTPResponse.py -- injects an empty 'Etag:' header, if the
>     response hasn't set one explicitly.  This behavior is totally
>     unhelpful;  an empty Etag can't be used properly to do *anything*
>     that Etags are for;  I am guessing that some client (the way-brokey
>     WebFolders, perhaps?) won't do WebDAV unless an Etag is present?

Andreas would be the man to ask on that one...

>   lib/python/webdav/{Collection,Resource} -- 'dav__init'
>     sets a weird, custom header,'MS-Author-Via', to 'DAV';  again, I
>     presume this permits some flaky client to work well with the
>     object handling the request.

yeah, this really needs to go so thanks for raising it. A particularly 
sucky manifestation of the problem: Try downloading an attached word 
document(which you only have read access to) when you have Office 2000 
or above installed. You'll get an M$ Auth dialog box pop up as Office 
tries to open the document via M$-DAV... extrememly unhelpful.

Worse still, if you allow webdav access to Anonymous, Office then goes 
and puts a WebDAV lock on the file! Urgg.... If you scan the 
zope@zope.org archives, you'll see my rather brutal ay of fixing this :-(

> cache pages with empty Etags, because they cannot be validated.  The
> second change could be less obnoxious if it was only done in the
> presence of the broken clients.

Well, not entirely. You only want this header to be included in the 
presence of broken clients IFF you want them to be able to _edit_ via 
WebDAV.

cheers,

Chris