Roxen.git / server / modules / misc / contenttypes.pike

version» Context lines:

Roxen.git/server/modules/misc/contenttypes.pike:1:   // This is a roxen module. Copyright © 1996 - 2009, Roxen IS.      // This module handles all normal extension to content type   // mapping. Given the file 'foo.html', it will per default   // set the contenttype to 'text/html'      inherit "module";   #include <module.h>    - constant cvs_version = "$Id: contenttypes.pike,v 1.25 2009/05/07 14:15:55 mast Exp $"; + constant cvs_version = "$Id$";   constant thread_safe = 1;   constant module_type = MODULE_TYPES;   constant module_name = "Content types";   constant module_doc = #"This module handles all normal extension to content type mapping.   Given the file 'foo.html', it will normally set the content type to 'text/html'.";      mapping (string:string) extensions=([]), encodings=([]);   mapping (string:int) accessed=([]);      void create()
Roxen.git/server/modules/misc/contenttypes.pike:22:    defvar("exts", Variable.Text(#"# This will include the defaults from a file.   # Feel free to add to this, but do it after the #include   # line if you want to override any defaults      #include <etc/extensions>", VAR_NOT_CFIF, "Extensions",   #"This is file extension to content type mapping. The format is as   follows: <table><tr><th>extension</th><th>type</th><th>encoding</th></tr>   <tr><td>gif</td><td>image/gif</td></tr>   <tr><td>gz</td> <td>STRIP</td><td>application/gnuzip</td></tr></table>   For a list of types, see <a - href='ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types' - >ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types</a>")); + href='http://www.iana.org/assignments/media-types' + >http://www.iana.org/assignments/media-types</a>"));       defvar("default",    Variable.String("application/octet-stream", VAR_NOT_CFIF,    "Default content type",    "This is the default content type which is "    "used if a file lacks extension or if the "    "extension is unknown.\n"));   }      string status()