aboutsummaryrefslogtreecommitdiffstats
tipidee: the ls.cgi program

tipidee
Software
skarnet.org

The ls.cgi internal program

ls.cgi is a binary that is suitable for using as a CGI script, e.g. called index.cgi, in a Web document hierarchy served by tipidee, when the goal of the index file is only to list the contents of the directory it resides in.

Interface

     ls.cgi
  • It is not meant to be invoked by users. It will fail if invoked outside of a CGI script context. As such, it is unexported (it will appear in libexecdir, not in bindir).
  • It is meant to be placed in the repository of CGI scripts and symlinked as index.cgi in the places where the URL of a directory should list the contents of said directory.
  • For instance, if example.com:443/index.cgi is a copy of, or a symlink to, ls.cgi, and the tipidee configuration says that this binary is meant to be a CGI script, then access to https://example.com will list the files available in the example.com:443/ directory.

Exit codes

0
success
100
wrong usage
111
system call failed

Notes

  • ls.cgi is very minimalistic. It provides no CSS or anything else than the bare list of files. It is provided as an example of how CGI scripts can work with tipidee.