No activity today, make something!
tiddlyweb Server Request Model

20160313160700 cdent  

When TiddlyWeb receives an HTTP request, the request is processes through several stages before content is handled or produced. Once a response is ready, the response is also processed through several stages.

  • Request
    • The request is received and processed by the WSGI applications in server_request_filters until it arrives at selector.
    • The selector application uses urls.map to determine what TiddlyWeb method (either in the tiddlyweb.web.handler package or a plugin) should handle it.
  • Handling
    • Each handler method performs the requested action, using the provided environ to determine the details of the action. The action usually involves getting or putting something to or from the store, transforming the content, as required, with a serializer.
    • The handler establishes the headers of a response with start_response and returns some content as an iterator.
    • If there have been any uncaught exceptions during the request, they are caught by the PermissionsExceptor or HTTPExceptor.
  • Response
    • The response is processed by the server_response_filters.
    • The response is finally given to the controlling web server.