plan9fox/werc/bin/contrib/rc-httpd/handlers/static-or-cgi

15 lines
175 B
Plaintext
Raw Normal View History

2022-06-30 15:40:21 +00:00
#!/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