docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 4.0System Developer ManualThe Roxen Module API
Copyright  2006, Roxen Internet Software
Suggestions, comments & compliments

Introduction to Roxen Modules
The Module Type Calling Sequence
Constants Common to All Modules
Callback Methods Common to All Modules
API Methods Common to All Modules
Module Variables
Tag Modules
Location (Filesystem) Modules
File Extension Modules
Filter Modules
Authentication Modules
Logger Modules
First Modules
Last Modules
Provider Modules
Content Type Modules
Directory Listing Modules

Content Type Modules

The module type constant for content-type modules is MODULE_TYPES.

array(string|int) type_from_extension(string ext)

Return an array ({ content_type, content_encoding }) devised from the file extension 'ext'. When 'ext' equals "default", Roxen wants to know a default type/encoding. If the content-type returned is the string "strip", the content-encoding returned will be kept, and another call be made for the last-but-one file extension to get the content type (eg for ".tar.gz" to resolve correctly).