diff options
Diffstat (limited to 'rc/bin/rc-httpd/handlers/static-or-cgi')
-rwxr-xr-x | rc/bin/rc-httpd/handlers/static-or-cgi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rc/bin/rc-httpd/handlers/static-or-cgi b/rc/bin/rc-httpd/handlers/static-or-cgi new file mode 100755 index 000000000..4d8a2d44a --- /dev/null +++ b/rc/bin/rc-httpd/handlers/static-or-cgi @@ -0,0 +1,14 @@ +#!/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 |