Re:

At 1:05 PM 10/16/95, TylerBrook@aol.com wrote:
>It appears that by convention most servers return an HTML page containing a
>directory listing if the requested URL specifies a directory.  I would like
>to do this in my server but I am not sure what to do about the root.   For
>the subdirectories, if the request URL resolves to a directory name, I return
>a directory listing.  However, if the root is requested, I return the home
>page.
>
>Is there a convention for requesting a directory listing of the root?

The fallacy that most of the Web labors under is that URLs specify
"directories" and "files". URLs specify a hierarchy of "containers" and the
"object" they contain. By convention, most Web servers map their file
system into this hierarchy of containers, and they are assumed to contain
files. But this is NOT what the URL/URI standard requires or implies. There
are plenty of HTTP servers where this is simply not true, mapping SQL
tables and database records into a hierarchy, for example.

That soapbox issue aside, it's generally considered a security hole to
allow unrestricted directory browsing. You should make sure that is what
you REALLY want to have happen. As for what it means to request the default
object in a container at the root of a given document hierarchy, the
convention has always been to return a default object if one is specified
(an index file, for example), or a list of all objects in that container.
There is no distinction between a URL with a long "container" path and one
that has only the default document root specified. The short answer is that
it works the same way for a URL like http://your.host.com/ as it does for
http://your.host.com/some_dir/

In any case, this really isn't a HTTP issue. It is a server-specific
implementation issue.

--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton                               StarNine Technologies, Inc.
chuck@starnine.com                             http://www.starnine.com/
cshotton@biap.com                                  http://www.biap.com/
                 "Shut up and eat your vegetables!"

Received on Monday, 16 October 1995 10:24:23 UTC