WebDAV question: My FTPstat and FTPlist are never reached
Hi Zopistas, I have defined a class as follows: class RedProjector(ObjectManager, PropertyManager, RoleManager, Item, FindSupport, PhotoFolder): within this class I have the following methods: security.declareProtected('FTP access', 'manage_FTPget', 'manage_FTPstat', 'manage_FTPlist') def manage_FTPget(self): """Handle GET requests.""" print "get" return self.read() def manage_FTPstat(self, REQUEST): """Handle STAT requests.""" print "stat" return ObjectManager.manage_FTPstat(REQUEST) def manage_FTPlist(self, REQUEST): """Handle LIST requests.""" print "list" return ObjectManager.manage_FTPlist(REQUEST) however neither of them is ever hit when I access an instance of the class trough WebDAV (I am using MS Word) Any tips what I am doing wrong is much appreciated. Robert
Robert Rottermann writes:
... "FTPstat" and "FTPlist"... however neither of them is ever hit when I access an instance of the class trough WebDAV (I am using MS Word)
Any tips what I am doing wrong is much appreciated. You use WebDAV rather than FTP ;-)
As fas as I know, WebDAV is not supposed to use the FTP methods. Dieter
Dieter, some time ago you sendt me the answer below. Thank you. However I am still at a loss. How do I use this WebDAV methods? The developper guide under the heading webdav support reads as follows: ---------------- In addition to inheriting from basic DAV classes, your classes must implement PUT and manage_FTPget. These two methods are also required for FTP support. So by implementing WebDAV support, you also implement FTP support. --------------- If I access my object by FTP my methods are reached. If I access it by WebDAV everything works fine, however my own methos are never reached. Since I want to alter the default behaviour I am at a loss. Any typs will be much appreciated Robert ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Robert Rottermann" <robert@redcor.ch> Cc: <zope@zope.org> Sent: Thursday, January 03, 2002 9:07 PM Subject: Re: [Zope] WebDAV question: My FTPstat and FTPlist are never reached
Robert Rottermann writes:
... "FTPstat" and "FTPlist"... however neither of them is ever hit when I access an instance of the class trough WebDAV (I am using MS Word)
Any tips what I am doing wrong is much appreciated. You use WebDAV rather than FTP ;-)
As fas as I know, WebDAV is not supposed to use the FTP methods.
Dieter
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Robert Rottermann writes:
The developper guide under the heading webdav support reads as follows: ---------------- In addition to inheriting from basic DAV classes, your classes must implement PUT and manage_FTPget. These two methods are also required for FTP support. So by implementing WebDAV support, you also implement FTP support. You should not trust documentation completely...
The quoted portion says 2 things: 1. WebDAV needs "PUT" andd "manage_FTPget" 2. WebDAV support entails FTP support While 1 is probably true, you made the experience that 2 is true only partially. Trust your experience more than the documentation!
... Since I want to alter the default behaviour I am at a loss. This means, you must find out what methods WebDAV uses and adapt these. I would instrument "ZPublisher.Publish.publish" with an "import pdb; pdb.set_trace()", then make a WebDAV request (Zope will stop in the Python debugger at the "set_trace()") and see how the request is processed.
Dieter
participants (2)
-
Dieter Maurer -
Robert Rottermann