From: tomo Date: Fri, 22 Sep 2006 04:19:53 +0000 (+0000) Subject: New file. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0785dcfeced2195d783d7a1b552482b5a19c0ff0;p=elisp%2Falbum.git New file. --- diff --git a/img.cgi b/img.cgi new file mode 100755 index 0000000..7b23a89 --- /dev/null +++ b/img.cgi @@ -0,0 +1,20 @@ +#!/bin/sh + +relfile=`echo "$QUERY_STRING"|cut -d'&' -f1` +size=`echo "$QUERY_STRING"|cut -d'&' -f2|cut -d'=' -f2` + +file=/home/tomo/pub/pages/`dirname "$relfile"`/"$size"/`basename "$relfile"` + +if [ -f $file ] +then + echo "Content-Type: `file -b --mime $file`" + echo "Content-Length: `ls -l $file | cut -d' ' -f6`" + echo + cat "$file" +# echo Content-Type: text/plain +# echo +# echo "$file" +else + xemacs -q -batch -l www-page.elc -f www-page-batch-get "$QUERY_STRING" +# xemacs -q -batch -l www-img.elc -f www-page-batch-get "$QUERY_STRING" +fi