Archive of UserLand's first discussion group, started October 5, 1998.

Re: domains vs doctree in mainresponder

Author:Brian V. Hughes
Posted:3/18/1999; 12:37:31 PM
Topic:domains vs doctree in mainresponder
Msg #:4248 (In response to 4228)
Prev/Next:4247 / 4249

I don't get it.

I'm trying to figure out what you want to do.

Here's what it sounds like to me.

You want one name to be either a table or a folder.

So the responder would behave like this.

First it would look in the table.

If it doesn't find it there, it would look in the folder.

Is this correct?

I know I came into this late, but I would like to try and help out.

I think I have a handle on what Clay is asking for, and it may be helpful to think about this from the other end...

Looking at the code in mainResponder.respond, it appears that Clay is seeing the result of his table entry, which is a filespec, being served via serveObject, when what he wants is for it to be served via serveFile.

In serveObject, if he's not using flRender=true at this stage, then the objects has it's type evaluated. If it's not a script, mainResponder.respond then checks to see if it should send the text of this object out raw text, but formatted for nice web display. If not, it just coerces the object to a string, get's its moddate and then sends it back to the browser.

But since the object in the table is a filespec, pointing to a folder, it would seem that logical that mainResponder.respond would realize that as it progressed to serve this object, and then would hand off the serving to serveFile, which would read in the static file, set the correct mime type and then ship that off to the browser.

Of course, the real trick here is, at what point does it make sense for mainResponder.respond to realize that it should serve the default file for the referenced folder (ala config.mainResponder.globals.defaultDirectoryItems), and not try to instead serveFolder...

Actually, after looking at serveFolder, this is actually what Clay really wants to have happen when address being pointed to by the HTTP URL is actually points to a filespec. Unfortunately, since Clay is looking to have the default item for the table point to a folder that also has a default item, this isn't happening. It's also possible that this might not be able to happen.

And so now I've typed in this really long explanation, when it appears that Dave does have the basics of what Clay is looking for. So I hope this lengthy explanation was helpful to someone. ;->

Hey, Clay, what happens if you directly reference the default item in your docTree table rather than allow Frontier to choose that item for you as it's default? In other words, point directly at http://yoursite/default rather than http://yoursite/.


There are responses to this message:


This page was archived on 6/13/2001; 4:48:52 PM.

© Copyright 1998-2001 UserLand Software, Inc.