[Prev][Next][Index][Thread]

Re: Changing defaults in CL-HTTP server



At 6:03 PM -0500 1997-01-15, Yaron Koren wrote:
>Hi,
>
>	I just set up a CL-HTTP server, at http://paradise.media.mit.edu:8000. I
>have two problems with the way it currently runs:
>
>- When you go to the main URL (the one above), you're sent directly to the file
>/cl-http/frame.html.
>
>- Files named "index.html" aren't what's served when you simply type in a
>directory name at the end, without a filename after it.
>
>Is there any way to change these? I haven't found one.
>
>						        Thanks,
>						                 Yaron Koren

Yes, see the documentation for Export-url

http://wilson.ai.mit.edu/cl-http/show-documentation?HTTP%3AEXPORT-URL

A directory-style list in HTML is the default content returned for the
get method on a URL directory path. This behavior is customized by
providing a response function via the :DIRECTORY-WRITER keyword.  This
response function is called with the arguments (URL STREAM) and must
return non-null when it handles the response. If it declines to handle
the response, it may return NIL, and the standard method will list the
directory as usual. HTTP:WRITE-INDEXED-DIRECTORY-LISTING is a directory
writer that will serve the contents of an index.html file found in
the directory. Other computed returns are possible.





References: