Hooks for dynamic content
Furnace framework > HTTP server > Serving static content

Prev:<static> ( root -- responder )


The static responder can be extended for dynamic content by associating quotations with MIME types in the hashtable stored in the special slot. The quotations have stack effect ( path -- response ).

A utility word uses the above feature to enable server-side .fhtml scripts, allowing a development style much like PHP:
enable-fhtml ( responder -- responder )


This feature is also used by http.server.cgi to run .cgi files.

It is also possible to override the hook used when serving static files to the client:
<file-responder> ( root hook -- responder )


The default just sends the file's contents with the request; xmode.code2html.responder provides an alternate hook which sends a syntax-highlighted version of the file.