Tclhttpd Domains

Tclhttpd decodes URLs into references to functional modules called domains, each of which is free to interpret the browser's httpd protocol interaction (including URLs) in any way it likes.

Access control and Basic authentication is performed before dispatching to a domain.

The following domains are standard with Tclhttpd:

Other domains can be created per-site, by including the domain handling code in the custom directory.

  • examples here

A new domain can be registered by means of the Url_PrefixInstall command, which maps a URL prefix to a tcl proc which handles all URLs with the given prefix.


Tclhttpd can roughly be functionally decomposed into

  1. http protocol interaction to get the request - http.tcl
  2. decoding a url - url.tcl
  3. Domain handling to generate content
  4. http protocol interaction to deliver the content - http.tcl