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

Re: AHA!!!




Richard.  What you are asking for is exactly what a directory export
in cl-http should do.  There is a flag that controls how recursive
exports are done.  The default configuration file has
(setq *auto-export* :on-demand) 
which means that cl-http dynamically computes the urls for files and
subdirectories in an exported directory. You can change that to 
:immediate-export if you want. 

I haven't fiddled with this for a few weeks, but I remember noticing
that :on-demand didn't work quite the way I was expecting (or maybe I
was just doing something wrong). If one tries to get files that are
down in a subdirectory of an exported directory, without trying to get
that directory first, cl-http doesn't seem to be able to find them
(when *auto-export* is :on-demand). I solved this problem by exporting
a directory and then one file in the directory, for example,

(export-url #u"/cs2300/" 
            :directory
            :pathname "/usr/local/etc/httpd/htdocs/cs2300/"
            :recursive-p t)

(export-url #u"/cs2300/syllabus.html" 
            :html-file
            :pathname "/usr/local/etc/httpd/htdocs/cs2300/syllabus.html")

This seemed to do the trick (although I didn't stare at the code long
enough to figure out why).

Perhaps John can enlighten us on why :on-demand works this way or whether
I am doing something wrong in the way I am exporting urls.

Jeff
----


Follow-Ups: References: