Notes on the TWS server

How the resource is located

  1. Parse the request into

  2. Use the hostname and path as a lookup into the dispatcher table. The following information is obtained from the dispatcher table:

  3. Use the information obtained from the dispatcher table to compute the following:

  4. Optionally convert the translated path to all lower-case letters

  5. Locate the file that will be used to satisfy the request using the following steps:

    1. If the translated path ends in "/", append "index"

    2. Check for files with the translated path as their basename and with any extension. If multiple files match, choose the first in lexical order.

    3. If no files are found in the previous step, replace the translated path with the path prefix followed by "notfound" and repeat the search.

    4. If still no files match, return a canned "Not Found" message.

  6. From the file found in the previous step, use the extension of the filename to lookup a MIME-type and a handler type in the MIME-type table.

Processing of Dynamic Content

Tcl variables available to dynamic code

Special commands available to dynamic code

The following new TCL commands are available to the code contained within <% ... %> of dynamic content: