httpd::mtype - Mime types
The package httpd::mtype provides functionality which determines the MIME type of a file and related utilities. The MIME type (e.g., text/html or image/jpeg) is used by the Document domain to dispatch out to type-specific document handlers. For example, if there is a procedure named Doc_image/jpeg then the Document domain will use that procedure to handle requests for files of that type.
Determines the MIME type of the file specified by path and returns it as the result of the command.
Set a number of hardwired mappings from file extensions to mime types first and then reads the specified types file to set up more.
Extract the mime-types favored by the browser making the current request on the connection sock and returns them as the result of the command. The result is a list.
Compares the mime type to the list of acceptable types and return a boolean flag. If true then the type is acceptable.
Adds a mapping from the file extension suffix to the mime type to the database maintained by this package
Clears all type mappings stored in the internal database.
files, filesystem, mime, type, web server
Copyright © 2003 Andreas Kupries <[email protected]>