[Zope-Coders] RFC: Remove funky WebDAV hackery?
Tres Seaver
tseaver@zope.com
10 Aug 2002 11:15:01 -0400
On Sat, 2002-08-10 at 10:53, Andreas Jung wrote:
>
> ----- Original Message -----
> From: "Chris Withers" <chrisw@nipltd.com>
> To: "Tres Seaver" <tseaver@zope.com>
> Cc: <zope-coders@zope.org>
> Sent: Saturday, August 10, 2002 11:50
> Subject: Re: [Zope-Coders] RFC: Remove funky WebDAV hackery?
>
>
> > 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?
>
> The empty Etag header is the workaround to make most M$ WebDAV
> implementations
> work with Zope (workaround for the "readonly" problem with M$ Word).
> A more sophisticated approach might be necessary when Etag headers
> are important for a Zope application.
Etags are critical for the cacheability of a Zope Page; any Etag
functions as a "strong validator" for the page, which means that
emitting an empty one weakens all cacheability, as Zope will never
validate the request! For some caches, the presence of the empty
Etag actually defeats cacheability altogether, which is a Bad Thing
(TM).
> However removing this workaroound
> would make some people unhappy since they want to work with Zope through
> Webfolders
Webfolders are still broken WRT Zope, as they only allow users to edit
content using Office (e.g., you can't open an image in Paint, or a
document in Notepad). I think we should:
- Move this behavior out of ZServer (too hardwired here).
- Add an Environment variable / Control Panel knob for enabling
and disabling ETag generation; likewise the 'MS-Edit-Via' header,
which is Too Evil To Live (at a minimum, it *must* have an 'X-'
prefix to be standards conforming!)
- If enabled, then use the code in webdav/Resource to emit the header,
rather than adding an empty header (any code which doesn't implement
the rest of the protocol shouldn't look to MSOffice like a DAV
resource, anyway!)
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com