hack-contrib-2009.4.52.2: Hack contribSource codeContentsIndex
Hack.Contrib.Middleware.SimpleRouter
Description

Stolen from rack: Rack::URLMap takes a hash mapping urls or paths to apps, and dispatches accordingly.

URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part relevant for dispatch is in the SCRIPT_NAME, and the rest in the PATH_INFO. This should be taken care of when you need to reconstruct the URL in order to create links.

URLMap dispatches in such a way that the longest paths are tried first, since they are most specific.

Documentation
route :: [RoutePath] -> MiddlewareSource
Produced by Haddock version 2.4.2