[z3-five] Problems with HTTP PUT and traversable/defaultViewable

Guido Wesdorp guido at infrae.com
Wed Feb 9 17:17:54 MET 2005


Hi!

I'm having some trouble using Five together with WebDAV PUT: as soon as 
I register a defaultView to a certain object, when I use PUT on that 
object (so the resource already exists, creating a resource works 
better) Zope responds with a 200 and delivers me the content of the 
object rather then calling the PUT method and returning a 204 (or 
whatever the PUT method says).

An excerpt of my configure.zcml:

  <five:traversable class=".document.Document" />

  <browser:page
    for=".interfaces.IDocument"
    template="direct.pt"
    name="index.html"
    permission="zope2.View" />

  <five:defaultViewable class=".document.Document" />

  <browser:defaultView
    for=".interfaces.IDocument"
    name="index.html"
    />

As soon as this piece of ZCML is added all WebDAV PUT requests to my 
Document type (except when it's freshly created, PUTting to a 
NullResource seems to work just fine for some reason) in the end end up 
in Five/viewable.py/Viewable/__browser_default__() rather then in the 
PUT method defined in the object, resulting in a plain 200 response (so 
the result is the same as that of a completely normal HTTP GET on the 
resource).

Hope anyone can help me out here?

Cheers,

Guido


More information about the z3-five mailing list