HTTPD written entirely in shell (works with Busybox)
Start with ACME micro_inetd or any other inetd.
##Features:
- works with inetd
- supports HTTP/1.0
- supports GET, POST and HEAD methods
- follows POST/Redirect/GET pattern
- single file
- exports request headers according to CGI standard: HTTP_
- add_route
- require_POST
- redirect
- read_post_var
- _e
Add following:
add_route '^/hello/$' hello
action_hello(){
X=`wc -l < /etc/passwd`
}
view_hello(){
echo "<html>"
echo "<p>lines in passwd: $X</p>"
cat file.txt | _e
echo "</html>"
}
$ micro-inetd 8080 /path/to/httpd.sh