[Zope] Hooks for methods other than GET/POST on port 80?

Roman Suzi rnd at onego.ru
Sat Dec 3 14:56:23 EST 2005


Hi!

I am looking for a way in Zope to receive HTTP-requests with, eg,
DELETE and PUT in the object method. Zope (2.7.x) seems to intercept these and
issue "Not authorised".

(I check REQUEST.REQUEST_METHOD to decide what to do in the object's method.
POST and GET are fine, but others are blocked in Zope.)

I do not want to do it "the right way" and create special kind of
ZServer (like for WebDAV), I just want Zope to let me decide what to do
if certain method is requested from a certain method of an object.

An example.
I want object X to receive a message Y with request method DELETE.
This is the raw thing the server need to receive:

DELETE /path/to/object/X/Y HTTP/1.1
Host: myhost.myorg.org
Content-Type: application/myprotocol+xml

Of course, I have a product Z which has this class:

class Z:
    ...

    def Y(self, REQUEST):
        if REQUEST.REQUEST_METHOD == 'POST':
             # no problem
        elif REQUEST.REQUEST_METHOD == 'DELETE':
             # this is never reached... Zope doesnt call Y


What do I tweak so object X will receive Y on a usual HTTP port 80?
THANKS!

Sincerely yours, Roman Suzi
-- 
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3



More information about the Zope mailing list