diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2013-02-04 16:40:05 -0600 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2013-02-04 16:40:05 -0600 |
commit | c877493fb00717de1a22860d88efb75ebf14ebec (patch) | |
tree | cb3cb0e47598e2880cdd20367925102856d41a5d /rc/bin/rc-httpd/handlers/static-or-cgi | |
parent | 0b212ed5054cd08bbc14a12936c07bc1ff5890a2 (diff) | |
download | plan9front-c877493fb00717de1a22860d88efb75ebf14ebec.tar.xz |
add rc-httpd
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 |