[Zope-Coders] Re: [Zope] WebDAV Locks / 2.4.3/ MS Office 2000

Chris Withers chrisw@nipltd.com
Wed, 16 Jan 2002 12:05:14 +0000


<apologies for moving list, I wanna fix this, it is important, so I shunted it
onto the coders list>

Joachim Werner wrote:
> 
> Hi!
> 
> I also tested Zope behind Apache. An unaltered Proxy Pass directive should
> also pass the WebDAV traffic unchanged. It does so for me, and apparently
> also for you, Chris.

Indeed.

> But I am rather sure that Apache can be configured to return a limited
> "OPTIONS" list. Just don't know how. What did you do, Jason?

This problem actually nothing to do with OPTIONS, which M$-DAV quite happily
ignores.

Basically, if either the 'MS-Author-Via' or 'DAV' headers are set in the
request, Excel _will_ try and lock the file using a WebDAV LOCK command,
regardless of whether the user only wants to (or has) read access, or what the
OPTIONS response tells it the server _can_ do...

Worse still, thanks to Zope's implementation, only one Anonymous user may have a
LOCK on an object at a time.

So, how do we go about modifying Zope so that it only sets those two headers
when the user has write access to the object AND the User-Agent is either
"Microsoft Data Access Internet Publishing Provider Cache Manager" or "Microsoft
Data Access Internet Publishing Provider DAV"?

cheers,

Chris

PS: On a more thorny note, if I wanna get these changes into the Zope core, I'll
need tests. How on earth do I go about writing tests for this?