On Mon, 26 Jul 2004 14:02:52 -0500 Kirk Strauser <kirk@daycos.com> wrote:
On Monday 26 July 2004 13:25, Casey Duncan wrote:
How would the client know what mime type to use?
Are you referring to the situation in which the webdav client is writing to an object that doesn't already exist? If so, then I have no good answer.
Right, me neither, especially in the absence of file extensions. Most clients are pretty clueless about setting a Content-Type HTTP header as well, and if you are using FTP, you're just SOL...
For the moment, I'm more interested in being able to open an already existing object and have a reasonably clueful editor automatically apply the appropriate syntax highlighting, indention rules, etc.
External editor solves this problem by adding file extensions to the temporary files you are editing based on what kind of object it is or what kind of data it contains. It can do this because it receives object metadata from the server. Some editors (such as NEdit) will introspect the file and try to determine what kind of file it is that way. This is easier to do with some formats (like HTML/XML) then others, but it us effective when it works.
Right now, whether using Emacs via FTP or Kate via webdav, I have to open each individual file and then tell the editor to load the appropriate editing mode. I would be quite happy to not have to do that anymore.
Yup. The stupid thing is that the Mac had this problem solved in 1984, with type/creator file metadata *sigh*.
How does Zope currently decide which mimetype to send when a client requests a file via webdav?
This is generally based on the content_type attribute of the object (as Chris said), but some objects have their own rules. It would not be difficult to wire in "text/x-python" for python scripts, for example. -Casey