shithub: riscv

ref: a0e65ca07515404d0fe80557d79b135d07183a85
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