7.5. Customizing the Type Checking Phase
Following the successful completion of the access control and authentication steps (if configured), Apache tries to determine the MIME type (e.g., image/gif ) and encoding type (e.g., x-gzip ) of the requested document. The types and encodings are usually determined by filename extensions. (The term "suffix" is used interchangeably with "extension" in the Apache source code and documentation.) Table 7.1 lists a few common examples.
By default, Apache's type checking phase is handled by the standard mod_mime module, which combines the information stored in the server's conf/mime.types file with AddType and AddEncoding directives to map file extensions onto MIME types and encodings.
The contents of the request record's content_type field are used to set the default outgoing Content-Type header, which the client uses to decide how to render the document. However, as we've seen, content handlers can, and often do, change the content type during the later response phase.
In addition to its responsibility for choosing MIME and encoding types for the requested document, the type checking phase handler also performs the crucial task of selecting the content handler for the document. ...