The mod_mime_magic Module for Apache HTTPD

Description

mod_mime_magic is a module for Apache HTTPD which was derived from a free version of the file command for Unix, originally posted on comp.sources.unix. You still want to use mod_mime first to determine MIME types by file name, because that's the most efficient way. Then mod_mime_magic can use "magic numbers" and other hints from the contents of the file to catch cases where file name suffixes are ambiguous or where users publish their own files without recognizable suffixes.

mod_mime_magic can be obtained from this site for use with Apache 1.1 and 1.2. It will be included with Apache 1.3 when it becomes available.

History

This idea is not new - it has probably been mentioned as a hypothetical capability of web servers since the beginning of the web. The experiment that led to this was done on the intranet (internal network) at Cisco Systems' Central Engineering in San Jose, California. A similar feature was originally added to internal derivatives of the NCSA and CERN HTTP servers in 1994 and 1995. This module for Apache HTTPD was written in 1996 so that the capability would not be lost when Cisco's Central Engineering intranet web server upgraded to Apache.

The module was submitted to the Apache Group in July 1997. One of several reasons that the approval for this was sought and granted was to return something to Apache for its contribution to the Internet community.

mod_mime_magic 1.17

Documentation

mod_mime_magic.html

Source

mod_mime_magic.c

Sample Magic File

magic

Download

mod_mime_magic.tgz

Revision Log

HISTORY

Patches

1.15 -> 1.17
1.10 -> 1.15

Last updated July 11, 1997
Ian Kluft
home: ikluft@thunder.sbay.org work: ikluft@cisco.com

Boycott Internet spam!