One request may need several sub requests; fastcgi defines 3 roles for backends which i would use here too (with a little bit different interpretation):
  • Authorizer: doesn't see the request content; request handling waits until result is available
    This one is the same as the fastcgi authorizer.
Implementation: authorize actionblock 
  * make a virtual request, copy the "request" into it
  * wait for response headers; if status = 200: drop content and go on
else forward content and response headers
  • Responder: generates the content
  • Filter: a response filter

Basic Structure

  • callbacks set by the master of a request:
    • handle_request_headers * handle_response_headers * handle_response_body * handle_response_error
  • callbacks set by the content handler via vrequest_handle_indirect:
    • handle_request_body
  • use vrequest_handle_direct if you don't need extra handling (like reading the request-body)

Updated by presbrey about 8 years ago · 5 revisions