changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > werc / changeset: bin/contrib/rc-httpd: rc-httpd add system $PATH to $path; bin/contrib/rc-httpd/handlers/serve-static: try two different versions of file(1) syntax

changeset 660: 442e31ec3a03
parent 659: e46fbed848f2
child 661: e175617671c9
author: sl
date: Wed, 10 Feb 2016 14:04:14 -0500
files: bin/contrib/rc-httpd/handlers/serve-static bin/contrib/rc-httpd/rc-httpd
description: bin/contrib/rc-httpd: rc-httpd add system $PATH to $path; bin/contrib/rc-httpd/handlers/serve-static: try two different versions of file(1) syntax
     1.1--- a/bin/contrib/rc-httpd/handlers/serve-static	Tue Feb 09 14:24:05 2016 -0500
     1.2+++ b/bin/contrib/rc-httpd/handlers/serve-static	Wed Feb 10 14:04:14 2016 -0500
     1.3@@ -31,7 +31,7 @@
     1.4 case *.png
     1.5         type=image/png
     1.6 case *
     1.7-        type=`{file -m $full_path}
     1.8+        type=`{file -i $full_path || file -m $full_path}	# GROSS
     1.9 }
    1.10 max_age=3600	# 1 hour
    1.11 echo 'HTTP/1.1 200 OK'^$cr
     2.1--- a/bin/contrib/rc-httpd/rc-httpd	Tue Feb 09 14:24:05 2016 -0500
     2.2+++ b/bin/contrib/rc-httpd/rc-httpd	Wed Feb 10 14:04:14 2016 -0500
     2.3@@ -1,6 +1,6 @@
     2.4 #!/bin/rc
     2.5 rc_httpd_dir=/home/sl/www/werc/bin/contrib/rc-httpd
     2.6-path=($PLAN9/bin $rc_httpd_dir/handlers)
     2.7+path=($PLAN9/bin $rc_httpd_dir/handlers $PATH)
     2.8 cgi_path=$PLAN9/bin
     2.9 SERVER_PORT=80 # default for CGI scripts, may be overridden by the Host header
    2.10 extra_headers='Server: rc-httpd'