docs.roxen.comBack to normal mode
DocsRoxenWebServer 3.4System Developer ManualThe Roxen Module API
Copyright © 2006, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com

File Extension Modules

File extension modules handle one or several different file types. A file extension module is called after a location, or other module type, has returned a Stdio.File object with the correct extension.

The module type constant is MODULE_FILE_EXTENSION.

array(string) query_file_extensions()

Returns an array of strings containing the extensions this module handles. It should be configurable by the user, the easiest way would be to use a configuration variable of TYPE_STRING_LIST.

mapping handle_file_extensions( Stdio.File file, string ext, RequestID id )

The method that will be called to do the actual work. file is the file object that a previous module returned. ext is the extension of the request, id the request information object. The return value is a response mapping.