[Zope-dev] Curious about age old WebDAV decisions...
Dieter Maurer
dieter at handshake.de
Thu Dec 29 13:14:42 EST 2005
Zachery Bir wrote at 2005-12-28 14:27 -0500:
>I've got a Folder (indirection) and a DTML Method (found) in the root
>of a Zope site. HEAD requests fail on the indirected DTML Method due
>to OFS.ObjectManager's __getitem__ method:
>
> def __getitem__(self, key):
> import pdb;pdb.set_trace()
> v=self._getOb(key, None)
> if v is not None: return v
> if hasattr(self, 'REQUEST'):
> request=self.REQUEST
> method=request.get('REQUEST_METHOD', 'GET')
> if request.maybe_webdav_client and not method in ('GET',
>'POST'):
> return NullResource(self, key, request).__of__(self)
> raise KeyError, key
>
>I wasn't around during the development of the WebDAV code, so I'm
>loathe to just jump in and start changing things, but why isn't
>'HEAD' exempted from the NullResource as well, given that HTTP specs
>state that HEAD *must* return the same headers that a GET would
>provide
Looks like a bug (not only here but probably at other places as well).
Altogether, this treatment is buggy: it cannot be the responsibility
of "ObjectManager.__getitem__" to handle things only senseful during
traversal; "ObjectManager[...]" can be called long after traversal
finished and then returning a "NullResource" definitely is stupid.
--
Dieter
More information about the Zope-Dev
mailing list