Name

http_mime_type, http_mime_type_add — look up and register MIME-type bindings for file extensions

Synopsis

varchar http_mime_type( in extension varchar);
 
http_mime_type_add( in extension varchar,
  in mime_type varchar);
 

Description

http_mime_type returns the MIME content type the server's HTTP layer associates with the given file extension (such as 'html', 'xml', 'png'). The returned string is the value that would be used in the Content-Type header for a static file with that extension.

http_mime_type_add installs or replaces the binding for extension, mapping it to mime_type. Pass a NULL mime_type to remove an existing mapping. Subsequent calls to http_mime_type and the HTTP file server pick up the change immediately. Useful for adding custom MIME types for new file formats served through the WebDAV or static-file layers.


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®