Version 35 of DustMote with Snit

Updated 2017-01-29 07:22:27 by dbohdan
What DustMote-Snit
Where https://github.com/tclssg/tclssg/tree/master/lib/dustmote-snit/
Description An extended version of the DustMote web server wrapped in a Snit type.
Platforms *BSD, Linux, macOS, Windows
Prerequisites Tcl 8.5 or newer, Tcllib, optionally TclTLS 1.6.7 or newer for HTTPS.
Updated 2017-01-29 (v0.11.0)
License Public domain (like DustMote itself)

DustMote-Snit is developed as part of Tclssg. It adds the following new features to DustMote:

  • Basic logging (to stdout);
  • Content-Type;
  • Custom route handlers.
  • Directory listings;
  • Every server being a Snit object, which means you can have multiple servers running at a time;
  • Path jailing (albeit not seriously tested for security);
  • Content-Range (resumed transfers);
  • TLS support;
  • Command line options when run as the main script;
  • Server reloading when run as the main script.

Known bugs and limitations:

  • Canceled transfers are not logged correctly.

Usage (from the command line)

usage: ./dustmote-snit.tcl -root value ?-host localhost? ?-port 8080? ?-default index.html? ?-verbose 1? ?-dirlists 1? ?-certfile public.pem? ?-keyfile private.pem? ?-tls 0?

You can use the following shell command to generate a set of temporary SSL certificates with OpenSSL:

openssl req -x509 -newkey rsa:2048 -nodes -keyout private.pem -out public.pem -subj '/CN=localhost' -days 1

Discussion

See also