Hi,

just a small change I've found useful when serving non-static images.

Cheers
Robert

--- a/bin/cgilib.rc     Sat Jun 20 11:56:12 2009 +0200
+++ b/bin/cgilib.rc     Sat Jul 11 12:37:55 2009 +0200
@@ -123,12 +123,15 @@
     { for(c in $co) echo $c } | sed -n 's/^ ?'$1'=//p'
}

+fn serve_file {
+    echo 'Content-Type: '$1
+    echo
+    cat
+    exit
+}

fn static_file {
-    echo 'Content-Type: '`{select_mime $1}
-    echo
-    cat $1
-    exit
+    serve_file `{select_mime $1} < $1
}

fn select_mime {


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"werc" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/werc9?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to