It doesn't. But one of the reasons that it doesn't is that a DTML Method can actually impersonate a lot of things, just by having the first line being:
Content-type: application/x-msword
I just tried that on Zope 2.3.1b1 and it doesn't work :-( That text just gets stuck at the top of the output... Any ideas? cheers, Chris
Hi Chris, at least <dtml-call "RESPONSE.setHeader('content-type','application/x-msword')"> schould do the trick. Regards Tino --On Sonntag, 8. April 2001 17:14 +0100 Chris Withers <chrisw@nipltd.com> wrote:
It doesn't. But one of the reasons that it doesn't is that a DTML Method can actually impersonate a lot of things, just by having the first line being:
Content-type: application/x-msword
I just tried that on Zope 2.3.1b1 and it doesn't work :-(
That text just gets stuck at the top of the output...
Any ideas?
cheers,
Chris
_______________________________________________ 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 )
On Mon, Apr 09, 2001 at 01:30:46PM +0200, Tino Wildenhain wrote:
at least <dtml-call "RESPONSE.setHeader('content-type','application/x-msword')"> schould do the trick.
Not when you are trying to edit the source via the WebDAV source port, it doesn't. Setting a 'content_type' property on a DTMLDocument will work though. Note that a GET will return text/html by default for DTMLMethods, BTW. However, a PROPFIND returns an empty content type; this is probably a bug, it should use content_type or default_content_type if either is present on the object. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
Hi Chris, --On Montag, 9. April 2001 13:42 +0100 Chris Withers <chrisw@nipltd.com> wrote:
Tino Wildenhain wrote:
Hi Chris,
at least <dtml-call "RESPONSE.setHeader('content-type','application/x-msword')"> schould do the trick.
I doubt that will help on the WebDAV source port :-S
Chris
Ah, sure, you are right. But then, what is a method supposed to return via DAV? For now there seems no real interface to override FTP/DAV behavior with ZClasses via web. So the method does its own default - return its own source. With custom objects on python level there is no problem to override this... Regards Tino
Tino Wildenhain wrote:
Ah, sure, you are right. But then, what is a method supposed to return via DAV? For now there seems no real interface to override FTP/DAV behavior with ZClasses via web.
This has nothing to do with ZClasses, they are the work of the devil ;-) Sorry, I didnt' mention in the original post, I'm trying to edit DTML Methods with GoLive over WebDAV. GoLive won't open anything that doesn't have a content type, and DTML Methods don't provide one, so I can't edit them over WebDAV. cheers, Chris
On Mon, Apr 09, 2001 at 02:21:14PM +0100, Chris Withers wrote:
Tino Wildenhain wrote:
Ah, sure, you are right. But then, what is a method supposed to return via DAV? For now there seems no real interface to override FTP/DAV behavior with ZClasses via web.
This has nothing to do with ZClasses, they are the work of the devil ;-)
Sorry, I didnt' mention in the original post, I'm trying to edit DTML Methods with GoLive over WebDAV. GoLive won't open anything that doesn't have a content type, and DTML Methods don't provide one, so I can't edit them over WebDAV.
I did some mnore experimentation, making sure that both PROPFIND and GET will return (at least) the default_content_type attribute for the content type of DTMLMethods (using attached patch, which I also put in the COllector). GoLive still will not edit it. The GoLive UI even tells me it knows the content type is 'text/html', but it will *only* edit objects with a .html extension. *sigh*. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
Martijn Pieters wrote:
The GoLive UI even tells me it knows the content type is 'text/html', but it will *only* edit objects with a .html extension. *sigh*.
Awww fuck. Excuse my language but not this again :-( It's why I stopped using DreamWeaver. Do all App developers on Windows have to be a brain dead as M$.... Distinctly pissed off, Chris
That's *got* to go into the quote list on zopezen.org, lol. ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Martijn Pieters" <mj@digicool.com> Cc: "Tino Wildenhain" <tino@wildenhain.de>; <jeffrey@digicool.com>; <zope@zope.org> Sent: Monday, April 09, 2001 2:46 PM Subject: Re: [Zope] More WebDAV fun.
Martijn Pieters wrote:
The GoLive UI even tells me it knows the content type is 'text/html',
but
it will *only* edit objects with a .html extension. *sigh*.
Awww fuck. Excuse my language but not this again :-( It's why I stopped using DreamWeaver. Do all App developers on Windows have to be a brain dead as M$....
Distinctly pissed off,
Chris
_______________________________________________ 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 )
participants (4)
-
Chris Withers -
Martijn Pieters -
Phil Harris -
Tino Wildenhain