Htbin

Htbin is a Plexus package for executing shell scripts that generate HTML, contributed by Oscar Nierstrasz at the University of Geneva. This package was developed to allow htbin scripts written for NCSA's httpd server to also run under Plexus.

If an URL of the form http://site/htbin/scripts/rest?query is requested, the server will execute the script htbin/script with arguments /rest and query. If either is missing, it will not be passed. (httpd convention.)

Note that scripts should normally print "Content-type: text/html\n\n" at the beginning (or whatever the type should be, e.g., "image/gif"). In any case, this package will pick up the type and print it in the MIME header, if needed.

Scripts should not normally exit with non-zero status. If they do, a server error will be logged. (This will happen if the script contains errors.)

See the htbin demo for an example.