2 full_path=`{echo $"FS_ROOT^$"PATH_INFO | urlencode -d}
6 if(test -d $full_path){
7 redirect perm $"location^'/' \
8 'URL not quite right, and browser did not accept redirect.'
11 if(! test -e $full_path){
15 if(! test -r $full_path){
26 type='text/plain; charset=utf-8'
34 type=`{file -m $full_path}
37 echo 'HTTP/1.1 200 OK'^$cr
39 echo 'Content-type: '^$type^'; charset=utf-8'^$cr
40 echo 'Content-length: '^`{ls -l $full_path | awk '{print $6}'}
41 echo 'Cache-control: max-age='^$max_age^$cr