plan9fox/rc/bin/rc-httpd/handlers/static-or-cgi
stanley lieber c877493fb0 add rc-httpd
2013-02-04 16:40:05 -06:00

15 lines
175 B
Bash
Executable file

#!/bin/rc
cgiargs=$*
fn error{
if(~ $1 404)
exec cgi $cgiargs
if not
$rc_httpd_dir/handlers/error $1
}
if(~ $location */)
exec cgi $cgiargs
if not
exec serve-static