IntroductionIntroduction
  CGI and SSICGI and SSI
  <pike> tag<pike> tag
  Pike scriptPike script
  ModulesModules
  Parser modulesParser modules
  Location modulesLocation modules
  Other module typesOther module types
    <Authentification>Authentification<Authentification>Authentification
    <Directory>Directory<Directory>Directory
    <Extension>Extension<Extension>Extension
    <File extension>File extension<File extension>File extension
    <Filter>Filter<Filter>Filter
    <First>First<First>First
    <Last>Last<Last>Last
    <Log>Log<Log>Log
    <Provider>Provider<Provider>Provider
    <URL>URL<URL>URL
  Request information objectRequest information object
  ResponsesResponses
  Library methodsLibrary methods
 
File extension

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.

The available API methods are:

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.

mixed handle_file_extensions( Stdio.File file, string extension, object id )
is the method that will be called to do the actual work. file is the file object that a previous module returned. extension is the extension of the request, id the request information object. For possible return values see the responses chapter.