shithub: riscv

ref: b959508d906a6f7c98fe03b8bfd520370061f20f
dir: /rc/bin/rc-httpd/handlers/static-or-cgi/

View raw version
#!/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