This module provides a few functions for dispatchers in general.
Changed in version 1.3 of package web-server-lib: Weakened the range contract to allow any
An exception thrown to indicate that a dispatcher does not apply to a particular request.
As the dispatcher/c contract suggests, a dispatcher is a function that takes a connection and request object and does something to them. Mostly likely it will generate some response and output it on the connection, but it may do something different. For example, it may apply some test to the request object, perhaps checking for a valid source IP address, and error if the test is not passed, and call next-dispatcher otherwise.
Consider the following example dispatcher, that captures the essence of URL rewriting: