mod_mime_magic.html revision cbdec3d6cc7bc0c1a344fb19bf00d1af1ca2365a
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<HTML>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <HEAD>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <TITLE>Apache module mod_mime_magic</TITLE>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </HEAD>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <BODY
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc BGCOLOR="#FFFFFF"
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd TEXT="#000000"
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd LINK="#0000FF"
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen VLINK="#000080"
2e545ce2450a9953665f701bb05350f0d3f26275nd ALINK="#FF0000"
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen >
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen <h1 align="CENTER">Module mod_mime_magic</h1>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd This module is an optional extension to the Apache HTTPD server.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd The current version can be obtained from
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen <a href="http://www.employees.org/~ikluft/apache/mod_mime_magic/">
3f08db06526d6901aa08c110b5bc7dde6bc39905nd http://www.employees.org/~ikluft/apache/mod_mime_magic/</a>.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <h2>Summary</h2>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
3f08db06526d6901aa08c110b5bc7dde6bc39905nd This module is derived from a free version of the <code>file(1)</code>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd command for Unix,
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd which uses "magic numbers" and other hints from a file's contents to
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd figure out what the contents are.
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd In the case of this module,
ecc5150d35c0dc5ee5119c2717e6660fa331abbftakashi it tries to figure out the MIME type of the file.
c04f76acce77126cf88b09350e56ea8c6b4a064enilgun <p>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd This module is only active if the magic file exists and
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end was successfully opened at server-configuration time.
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen The magic file can be named by the
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen <A HREF="#mimemagicfile"><code>MimeMagicFile</code></a>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd directive or defaults to conf/magic.
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem <p>
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem The contents of the file are plain ASCII text in 4-5 columns.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd Blank lines are allowed but ignored.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd Commented lines use a hash mark "#".
3f08db06526d6901aa08c110b5bc7dde6bc39905nd The remaining lines are parsed for the following columns:
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <table border=1>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr valign=top>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <th>Column</th>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <th>Description</th>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr valign=top>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>1</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>byte number to begin checking from
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <br>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd "&gt;" indicates a dependency upon the previous non-"&gt;" line</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </tr><tr valign=top>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>2</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>type of data to match
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <table border=1>
71fccc298df6a1540d408151a26aa22beed55d0bnd <tr><td>byte</td><td>single character</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>short</td><td>machine-order 16-bit integer</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>long</td><td>machine-order 32-bit integer</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>string</td><td>arbitrary-length string</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>date</td><td>long integer date
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd (seconds since Unix epoch/1970)</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>beshort</td><td>big-endian 16-bit integer</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>belong</td><td>big-endian 32-bit integer</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>bedate</td><td>big-endian 32-bit integer date</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>leshort</td><td>little-endian 16-bit integer</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>lelong</td><td>little-endian 32-bit integer</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <tr><td>ledate</td><td>little-endian 32-bit integer date</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </table>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </tr><tr valign=top>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>3</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>contents of data to match</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </tr><tr valign=top>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>4</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>MIME type if matched</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </tr><tr valign=top>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>5</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <td>MIME encoding if matched (optional)</td>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </table>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd For example, the following magic file lines
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd would recognize some audio formats.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<pre>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd# Sun/NeXT audio data
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string .snd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd&gt;12 belong 1 audio/basic
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd&gt;12 belong 2 audio/basic
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd&gt;12 belong 3 audio/basic
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd&gt;12 belong 4 audio/basic
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd&gt;12 belong 5 audio/basic
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd&gt;12 belong 6 audio/basic
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd&gt;12 belong 7 audio/basic
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd&gt;12 belong 23 audio/x-adpcm
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd</pre>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd Or these would recognize the difference between "*.doc" files containing
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd Microsoft Word or FrameMaker documents. (These are incompatible file
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd formats which use the same file suffix.)
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<pre>
71fccc298df6a1540d408151a26aa22beed55d0bnd# Frame
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \&lt;MakerFile application/x-frame
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \&lt;MIFFile application/x-frame
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \&lt;MakerDictionary application/x-frame
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \&lt;MakerScreenFon application/x-frame
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \&lt;MML application/x-frame
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \&lt;Book application/x-frame
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \&lt;Maker application/x-frame
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd# MS-Word
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \376\067\0\043 application/msword
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \320\317\021\340\241\261 application/msword
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \333\245-\0\0\0 application/msword
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd</pre>
5652dbe450e4fcfdf36d4cfb42d7f2345ded29a4maczniak
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd An optional MIME encoding can be included as a fifth column.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd For example, this can recognize gzipped files and set the encoding
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd for them.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<pre>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd# gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd0 string \037\213 application/octet-stream x-gzip
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd</pre>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <h3>Performance Issues</h3>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd This module is not for every system. If your system is barely keeping
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd up with its load or if you're performing a web server benchmark,
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd you may not want to enable this because the processing is not free.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd However, an effort was made to improve the performance of the original
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd file(1) code to make it fit in a busy web server.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd It was designed for a server where there are thousands of users who
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd publish their own documents.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd This is probably very common on intranets.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd Many times, it's helpful
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd if the server can make more intelligent decisions about a file's
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd contents than the file name allows
71fccc298df6a1540d408151a26aa22beed55d0bnd ...even if just to reduce the "why doesn't my page work" calls
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd when users improperly name their own files.
a8703cfb67133446eef7af1043640e71486e9ecand You have to decide if the extra work suits your environment.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd When compiling an Apache server, this module should be at or near the
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd top of the list of modules in the Configuration file. The modules are
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd listed in increasing priority so that will mean this one is used only
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd as a last resort, just like it was designed to.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <h2>Directives</h2>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <UL>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <LI><A HREF="#mimemagicfile">MimeMagicFile</A>
71fccc298df6a1540d408151a26aa22beed55d0bnd </LI>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </UL>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd </P>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <HR>
71fccc298df6a1540d408151a26aa22beed55d0bnd <H2><A NAME="mimemagicfile">
71fccc298df6a1540d408151a26aa22beed55d0bnd MimeMagicFile
71fccc298df6a1540d408151a26aa22beed55d0bnd </A></H2>
71fccc298df6a1540d408151a26aa22beed55d0bnd <P>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <STRONG>Syntax:</STRONG> MimeMagicFile <em>magic-file-name</em>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <BR>
b3c7a2279fa7a45f5807d9a404760b9b3760df50nd <STRONG>Default:</STRONG> conf/magic
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <BR>
316f02e3836836c82e19019ff23f90a7ebc65289nilgun <STRONG>Context:</STRONG> server config, virtual host
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <BR>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <STRONG>Status:</STRONG> Extension
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <BR>
22d5d84393d960a2027f472036f3fee15d7dbce9nd <STRONG>Module:</STRONG> mod_mime_magic
22d5d84393d960a2027f472036f3fee15d7dbce9nd <p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
4b311579b2c8aebac85fb7cb8ac89e6c37b4bc1asf The MimeMagicFile directive can be used to change the location of the
50c04f297d76a57ead2fa6b73845f7563b1fc788sf magic file from its default location at <code>conf/magic</code>.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd Non-rooted paths are relative to the ServerRoot.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <HR>
623eebe956d9c2d6d073ed3eae855b56030b40e9noodl
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <h2><a name="notes">Notes</a></h2>
ffb88a4885747797937e30a5ac8b1606da3cb4adnd
909ce17e2bd0faef7b1c294f2307f009793fd493nd Patches and suggestions for mod_mime_magic should be sent to
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd Ian Kluft &lt;ikluft<!--- comment inserted to discourage spam --->@cisco.com&gt;.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd Note that enhancements are done on a volunteer basis so no timetable can
cd34a6fbf0a2619544a72eadb73f309370bf6682wrowe be committed for any particular request.
65a611af7093423efb91e5794b8887a527d4cf63trawick Obviously, patches are given much higher priority over plain requests.
42af92a661a06b3cebc88d585aad75064a309d51nd <p>
ffb88a4885747797937e30a5ac8b1606da3cb4adnd The following notes apply to the mod_mime_magic module and are
6fe26506780e73be2a412d758af77fafdf03291and included here for compliance with contributors' copyright restrictions
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd that require their acknowledgement.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<pre>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd/*
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * mod_mime_magic: MIME type lookup via file magic numbers
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * Copyright (c) 1996-1997 Cisco Systems, Inc.
08cf4a15275e4cb65a424b3a1db5410bfb51085cjim *
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * This software was submitted by Cisco Systems to the Apache Group in July
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin * 1997. Future revisions and derivatives of this source code must
f5a398cc8880978754903f9ece8e4beb63a81cedrbowen * acknowledge Cisco Systems as the original contributor of this module.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * All other licensing and usage conditions are those of the Apache Group.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd *
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * Some of this code is derived from the free version of the file command
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * originally posted to comp.sources.unix. Copyright info for that program
7906201913b68fe78b9d6a22ab33bf21d82c490eminfrin * is included below as required.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * ---------------------------------------------------------------------------
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin.
05ede5110427cb9dc071cc671d5aaba5d3b88c79nd *
e8b603fa9ccf7b17b11b42df6d8916fd97c2331dnd * This software is not subject to any license of the American Telephone and
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * Telegraph Company or of the Regents of the University of California.
4ed26c413f67a5aae20b95909828f30bb5dc2286poirier *
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * Permission is granted to anyone to use this software for any purpose on any
611049e38bfbaeb173d2d7fab2e44a48753436a1nd * computer system, and to alter it and redistribute it freely, subject to
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * the following restrictions:
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd *
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * 1. The author is not responsible for the consequences of use of this
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * software, no matter how awful, even if they arise from flaws in it.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd *
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * 2. The origin of this software must not be misrepresented, either by
03a4ff9ac4c9b8009249010e7c53bb86ff05915and * explicit claim or by omission. Since few users ever read sources, credits
5effc8b39fae5cd169d17f342bfc265705840014rbowen * must appear in the documentation.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd *
d0828c8a321dc5e9ea60550f052294669c08cf93jim * 3. Altered versions must be plainly marked as such, and must not be
d0828c8a321dc5e9ea60550f052294669c08cf93jim * misrepresented as being the original software. Since few users ever read
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * sources, credits must appear in the documentation.
4b5981e276e93df97c34e4da05ca5cf8bbd937dand *
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * 4. This notice may not be removed or altered.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * -------------------------------------------------------------------------
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd *
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd * For complicance with Mr Darwin's terms: this has been very significantly
2704de98885368683621b01c8f8f4e4b01557611takashi * modified from the free "file" command.
2704de98885368683621b01c8f8f4e4b01557611takashi * - all-in-one file for compilation convenience when moving from one
2704de98885368683621b01c8f8f4e4b01557611takashi * version of Apache to the next.
d0828c8a321dc5e9ea60550f052294669c08cf93jim * - Memory allocation is done through the Apache API's pool structure.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * - All functions have had necessary Apache API request or server
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * structures passed to them where necessary to call other Apache API
c819c19c2f1ffbf3a3f12a4070cc6c3f4ea2a6f2sf * routines. (i.e. usually for logging, files, or memory allocation in
d2b809e5d72658bff23819d8b77f20e4939af541nd * itself or a called function.)
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * - struct magic has been converted from an array to a single-ended linked
a4687128d43515b5791a6efc6ba55314478f9552jim * list because it only grows one record at a time, it's only accessed
04bab87733a0e93a926e82311c85cd8ac06a032fnd * sequentially, and the Apache API has no equivalent of realloc().
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * - Functions have been changed to get their parameters from the server
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * configuration instead of globals. (It should be reentrant now but has
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * not been tested in a threaded environment.)
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * - Places where it used to print results to stdout now saves them in a
5effc8b39fae5cd169d17f342bfc265705840014rbowen * list where they're used to set the MIME type in the Apache request
27d778df0b517e1578f907d2e51eb961cd8ee5fbjim * record.
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd * - Command-line flags have been removed since they will never be used here.
a43bfa789f4e52dde53ae8e53fa0427b5c1cf977nd *
a43bfa789f4e52dde53ae8e53fa0427b5c1cf977nd */
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd</pre>
438b4817913a5ff55d9cad4c7ddf133330b4466ejim
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi </BODY>
50cb7e2b30597f481fee57bac945190f06ebcc58jorton</HTML>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd