[Zope] Re: GoLive and WebDAV

Chris Withers chrisw@nipltd.com
Mon, 02 Apr 2001 23:51:56 +0100


Jeffrey P Shell wrote:
> 
> > 1) Put .html on your Zope ids.  But if you're saying that we don't send
> > back the content type on the source port, then that's gotta be a bug.
> 
> 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

Cool, so all I have to do is set the first line of all my DTML methods to:

Content-type: text/html

...and GoLive will be happy?

> ZPT should be architected to handle this issue better, but DTML Methods
> never were.

Could DTML methods be made to return text/html as the default? It seems sensible
to me, 'cos 99% of the time DTML methods _do_ generate HTML, am I missing
something?

> This is the biggest thing though that I'd like to see fixed in the next
> GoLive - better content sniffing.

I think GoLive's doing okay, Zope is being a little unhelpful ;-)

> open something it doesn't recognize.  But then again, if you have the items
> 'connect' and 'openConnection' in a folder, can you tell which one is a
> database connection? 

Content type?

> > 2) I guess the answer here is the same as (1).  I can't think of a
> > better solution.  Perhaps something like getting the PUT handler to look
> > for a meta type?  

Again, content type seems like a good bet to me, couples with file extension:
text/html or .html    -> DTML Method (please, not documents ;-)
test/python(?) or .py -> Python Script
.sql                  -> SQL Methods
.zpt                  -> ZPT

with the rest going to files or images. In my dreams, FTP would behave the same
way...
Is any of this possible without too much work?

> Yep.  You'll need the Zope trunk/ Zope 2.4 for this.  

OK, thanks :-) I knew I saw the checkin mails but lost which branch they
happened on...

> If you want to make
> your own objects lockable, you should read over the document in the
> WriteLocking project at dev.zope.og:
> 
> http://dev.zope.org/Wikis/DevSite/Projects/WriteLocking/BeingLockable

Cool...

Thanks for all your help :-)

Chris