shithub: werc

ref: bbfa1958ced87eb3ebf6d2e01e33c0e45f4b85d0
dir: /bin/contrib/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