From b64418b85fe4c9e5fcd1a9fb74f10baad608d23a Mon Sep 17 00:00:00 2001 From: Stanley Lieber Date: Wed, 10 Feb 2016 14:04:14 -0500 Subject: [PATCH] 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 --- bin/contrib/rc-httpd/handlers/serve-static | 2 +- bin/contrib/rc-httpd/rc-httpd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/contrib/rc-httpd/handlers/serve-static b/bin/contrib/rc-httpd/handlers/serve-static index 8c2ada5..ab4407c 100755 --- a/bin/contrib/rc-httpd/handlers/serve-static +++ b/bin/contrib/rc-httpd/handlers/serve-static @@ -31,7 +31,7 @@ case *.gif case *.png type=image/png case * - type=`{file -m $full_path} + type=`{file -i $full_path || file -m $full_path} # GROSS } max_age=3600 # 1 hour echo 'HTTP/1.1 200 OK'^$cr diff --git a/bin/contrib/rc-httpd/rc-httpd b/bin/contrib/rc-httpd/rc-httpd index 4866666..681b37a 100755 --- a/bin/contrib/rc-httpd/rc-httpd +++ b/bin/contrib/rc-httpd/rc-httpd @@ -1,6 +1,6 @@ #!/bin/rc rc_httpd_dir=/home/sl/www/werc/bin/contrib/rc-httpd -path=($PLAN9/bin $rc_httpd_dir/handlers) +path=($PLAN9/bin $rc_httpd_dir/handlers $PATH) cgi_path=$PLAN9/bin SERVER_PORT=80 # default for CGI scripts, may be overridden by the Host header extra_headers='Server: rc-httpd'