From 16888d779037393956365ff366fb0c20fcff6de1 Mon Sep 17 00:00:00 2001 From: Joshua Slive Date: Thu, 2 May 2002 17:46:35 +0000 Subject: [PATCH] Further cleanup of mod_mime docs: - Shorten up the summary a little. - Remove some cross-references where the link is already in the directive text. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94906 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_mime.html | 179 ++++++++++++++++--------------- docs/manual/mod/mod_mime.xml | 193 +++++++++++++++++----------------- 2 files changed, 189 insertions(+), 183 deletions(-) diff --git a/docs/manual/mod/mod_mime.html b/docs/manual/mod/mod_mime.html index 3cd71e0617..c8f431e61b 100644 --- a/docs/manual/mod/mod_mime.html +++ b/docs/manual/mod/mod_mime.html @@ -19,46 +19,22 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The directives AddCharset, AddEncoding, AddLanguage and AddType are all used to map file extensions onto the meta-information for that file. Respectively they set the character set, content-encoding, content-language, - and MIME-type (content-type) of documents.

- -

In addition, mod_mime may define the "handler" - for a document, which controls what module or script will serve - the document. With the introduction of "filters" in Apache 2.0, - mod_mime can also define the filters that the the - content should be processed through (e.g. the Includes output - filter for server side scripting) and what filters the client - request and POST content should be processed through (the input - filters.)

- -

The directives AddHandler, AddOutputFilter, and AddInputFilter control the modules + and MIME-type (content-type) of documents. The directive TypesConfig is used to specify a + file which also maps extensions onto MIME types.

+ +

In addition, mod_mime may define the handler and filters that originate and process + content. The directives AddHandler, AddOutputFilter, and AddInputFilter control the modules or scripts that serve the document. The MultiviewsMatch directive allows mod_negotiation to consider these file extensions to included when testing Multiviews matches.

-

The directive TypesConfig is used to specify a - file which also maps extensions onto MIME types. Most - administrators use the provided mime.types file which associates - common filename extensions with IANA registered content types. The - current list is maintained at - http://www.isi.edu/in-notes/iana/assignments/media-types/media-types. This - simplifies the httpd.conf file by providing the - majority of media-type definitions, and they may be overridden by - AddType directives as - needed.

- -
Please do not send requests to the Apache httpd Project - to add any new entries in the distributed mime.types file - unless (1) they are already registered with IANA, and (2) they - use widely accepted, non-conflicting filename extensions across - platforms. category/x-subtype requests will be automatically - rejected, as will any new two-letter extensions as they will - likely conflict later with the already crowded language and - character set namespace.
- -

The core directives ForceType and SetHandler are used to associate all the - files in a given container (e.g., <location>, <director>, or <Files>) with a particular - MIME-type or handler. These settings override any filename - extension mappings defined in mod_mime.

+

While mod_mime associates meta-information + with filename extensions, the core server + provides directives that are used to associate all the files in a + given container (e.g., <location>, <directory>, or <Files>) with particular + meta-information. These directives include ForceType, SetHandler, SetInputFilter, and SetOutputFilter. The core directives + override any filename extension mappings defined in + mod_mime.

Note that changing the meta-information for a file does not change the value of the Last-Modified header. @@ -68,7 +44,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX encoding) you may need to 'touch' affected files (updating their last modified date) to ensure that all visitors are receive the corrected content headers.

-

Directives

See also

Files with Multiple Extensions

+

Directives

See also

Files with Multiple Extensions

Files can have more than one extension, and the order of the @@ -252,14 +228,15 @@ Content-Type: text/plain; charset=ISO-8859-2

The extension argument is case-insensitive, and can be specified with or without a leading dot.

-

See also


AddHandler Directive

Description: Maps the filename extensions +

AddHandler Directive

Description: Maps the filename extensions to the specified handler
Syntax:AddHandler handler-name extension [extension] ...
Context:server config, virtual host, directory, .htaccess
Override:FileInfo
Status:Base
Module:mod_mime
Compatibility:
-

This mapping is added to any already in - force, overriding any mappings that already exist for the same - extension. For example, to activate CGI scripts with - the file extension ".cgi", you might use:

+

Files having the named extension will be served by the +specified handler-name. This mapping is +added to any already in force, overriding any mappings that already +exist for the same extension. For example, to activate CGI +scripts with the file extension ".cgi", you might +use:

AddHandler cgi-script .cgi @@ -272,22 +249,20 @@ to the specified handler
Files with - multiple extensions
  • Handlers
  • SetHandler

  • AddInputFilter Directive

    Description: Maps filename extensions +

    See also


    AddInputFilter Directive

    Description: Maps filename extensions to the filters that will process client requests
    Syntax:AddInputFilter filter[;filter...] extension [extension ...]
    Context:server config, virtual host, directory, .htaccess
    Status:Base
    Module:mod_mime
    Compatibility:AddInputFilter is only available in Apache 2.0.26 and later.
    -

    AddInputFilter maps the filename extensions - extension to the filter or filters which will process +

    AddInputFilter maps the filename extensions extension + to the filters which will process client requests and POST input when they are received by the server. This is in addition to any filters defined elsewhere, including the SetInputFilter directive. - This mapping is merged over any already in force, overriding - any mappings that already exist for the same - extension.

    + This mapping is merged over any already in force, overriding any + mappings that already exist for the same extension.

    If more than one filter is specified, they must be separated by semicolons in the order in which they should process the @@ -295,8 +270,7 @@ to the specified handler

    Filters - documentation.
  • SetInputFilter

  • AddLanguage Directive

    Description: Maps the given filename extension +

    AddLanguage Directive

    Description: Maps the given filename extension to the specified content language
    Syntax:AddLanguage MIME-lang extension [extension] ...
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    Status:Base
    Module:mod_mime
    @@ -339,29 +313,29 @@ to the specified content language
    Files with - multiple extensions
  • mod_negotiation

  • AddOutputFilter Directive

    Description: maps the filename +

    See also


    AddOutputFilter Directive

    Description: maps the filename extensions to the filters that will process responses from the server
    Syntax:AddOutputFilter filter[;filter...] extension [extension ...]
    Context:server config, virtual host, directory, .htaccess
    Override:
    Status:Base
    Module:mod_mime
    Compatibility:AddOutputFilter is only available in Apache 2.0.26 and later.
    -

    The AddOutputFilter directive maps the filename - extensions extension to the filters which will process - responses from the server before they are sent to the client. - This is in addition to any filters defined elsewhere, including - the SetOutputFilter +

    The AddOutputFilter directive maps the + filename extensions extension to the filters which will process responses + from the server before they are sent to the client. This is in + addition to any filters defined elsewhere, including the + SetOutputFilter directive. This mapping is merged over any already in force, overriding any mappings that already exist for the same extension.

    For example, the following configuration will process all - .shtml files for server-side includes.

    + .shtml files for server-side includes and will then compress + the output using mod_deflate.

    -   AddOutputFilter INCLUDES shtml + AddOutputFilter INCLUDES;DEFLATE shtml

    If more than one filter is specified, they must be separated @@ -370,17 +344,17 @@ responses from the server

    Filters documentation
  • SetOutputFilter

  • AddType Directive

    Description: Maps the given filename extensions +

    AddType Directive

    Description: Maps the given filename extensions onto the specified content type
    Syntax:AddType MIME-type extension [extension] ...
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    Status:Base
    Module:mod_mime
    -

    The AddType directive maps the given filename extensions - onto the specified content type. MIME-type is the MIME - type to use for filenames containing extension. This - mapping is added to any already in force, overriding any - mappings that already exist for the same extension. - This directive can be used to add mappings not listed in the - MIME types file (see the TypesConfig +

    The AddType directive maps the given filename extensions onto + the specified content type. MIME-type is the MIME type to + use for filenames containing extension. This mapping is + added to any already in force, overriding any mappings that + already exist for the same extension. This directive can + be used to add mappings not listed in the MIME types file (see the + TypesConfig directive).

    Example:

    @@ -393,14 +367,10 @@ onto the specified content type
    TypesConfig file.
    -
    Note that, unlike the NCSA httpd, this directive cannot be - used to set the type of particular files.
    -

    The extension argument is case-insensitive, and can be specified with or without a leading dot.

    -

    See also


    DefaultLanguage Directive

    Description: Sets all files in the given scope to the +

    See also


    DefaultLanguage Directive

    Description: Sets all files in the given scope to the specified language
    Syntax:DefaultLanguage MIME-lang
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    Status:Base
    Module:mod_mime
    Compatibility:DefaultLanguage is only available in Apache 1.3.4 and later.
    @@ -422,8 +392,11 @@ specified language
    Files with - multiple extensions
  • mod_negotiation

  • MultiviewsMatch Directive

    Description: The types of files that will be included when +

    Example

    +DeafaultLanguage en +
    + +

    See also


    MultiviewsMatch Directive

    Description: The types of files that will be included when searching for a matching file with MultiViews
    Syntax:MultiviewsMatch [NegotiatedOnly] [Handlers] [Filters] [Any]
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    Status:Base
    Module:mod_mime
    Compatibility:Available in Apache 2.0.26 and later.
    @@ -452,7 +425,15 @@ searching for a matching file with MultiViews
    -

    See also


    RemoveCharset Directive

    Description: Removes any character set associations for a set of file + +

    For example, the following configuration will allow handlers + and filters to participate in Multviews, but will exclude unknown + files:

    +
    +MultiviewsMatch Handlers Filters +
    + +

    See also


    RemoveCharset Directive

    Description: Removes any character set associations for a set of file extensions
    Syntax:RemoveCharset extension [extension] ...
    Context:directory, .htaccess
    Status:Base
    Module:mod_mime
    Compatibility:RemoveCharset is only available in Apache 2.0.24 and later.
    @@ -464,6 +445,11 @@ extensions
    Sy

    The extension argument is case-insensitive, and can be specified with or without a leading dot.

    + +

    Example

    +RemoveCharset .html .shtml +
    +

    RemoveEncoding Directive

    Description: Removes any content encoding associations for a set of file extensions
    Syntax:RemoveEncoding extension [extension] ...
    Context:directory, .htaccess
    Status:Base
    Module:mod_mime
    Compatibility:RemoveEncoding @@ -542,6 +528,7 @@ extensions
    Sy

    The extension argument is case-insensitive, and can be specified with or without a leading dot.

    +

    RemoveLanguage Directive

    Description: Removes any language associations for a set of file extensions
    Syntax:RemoveLanguage extension [extension] ...
    Context:directory, .htaccess
    Status:Base
    Module:mod_mime
    Compatibility:RemoveLanguage @@ -600,20 +587,38 @@ extensions
    Sy be specified with or without a leading dot.


    TypesConfig Directive

    Description: The location of the mime.types file
    Syntax:TypesConfig file-path
    Default:TypesConfig conf/mime.types
    Context:server config
    Status:Base
    Module:mod_mime
    -

    The TypesConfig directive sets the location of the MIME - types configuration file. Filename is relative to the - ServerRoot. This file sets - the default list of mappings from filename extensions to - content types; changing this file is not recommended. Use the - AddType directive instead. The file - contains lines in the format of the arguments to an AddType - command:

    +

    The TypesConfig directive sets the location of the MIME types + configuration file. Filename is relative to the ServerRoot. This file sets the + default list of mappings from filename extensions to content + types. Most administrators use the provided + mime.types file, which associates common filename + extensions with IANA registered content types. The current list is + maintained at + http://www.isi.edu/in-notes/iana/assignments/media-types/media-types. This + simplifies the httpd.conf file by providing the + majority of media-type definitions, and may be overridden by + AddType directives as + needed. You should not edit the mime.types file, + because it may be replaced when you upgrade your server.

    + +

    The file contains lines in the format of the arguments to + an AddType directive:

    MIME-type extension extension ...

    - The extensions are lower-cased. Blank lines, and lines + The case of the extension does not matter. Blank lines, and lines beginning with a hash character (`#') are ignored.

    -

    Apache HTTP Server Version 2.0

    IndexHome \ No newline at end of file + +
    Please do not send requests to the Apache HTTP Server Project + to add any new entries in the distributed mime.types file + unless (1) they are already registered with IANA, and (2) they + use widely accepted, non-conflicting filename extensions across + platforms. category/x-subtype requests will be automatically + rejected, as will any new two-letter extensions as they will + likely conflict later with the already crowded language and + character set namespace.
    + +

    See also


    Apache HTTP Server Version 2.0

    IndexHome \ No newline at end of file diff --git a/docs/manual/mod/mod_mime.xml b/docs/manual/mod/mod_mime.xml index 70140dff55..21b0400ab4 100644 --- a/docs/manual/mod/mod_mime.xml +++ b/docs/manual/mod/mod_mime.xml @@ -30,18 +30,14 @@ module="mod_mime">AddType are all used to map file extensions onto the meta-information for that file. Respectively they set the character set, content-encoding, content-language, - and MIME-type (content-type) of documents.

    - -

    In addition, mod_mime may define the "handler" - for a document, which controls what module or script will serve - the document. With the introduction of "filters" in Apache 2.0, - mod_mime can also define the filters that the the - content should be processed through (e.g. the Includes output - filter for server side scripting) and what filters the client - request and POST content should be processed through (the input - filters.)

    + and MIME-type (content-type) of documents. The directive TypesConfig is used to specify a + file which also maps extensions onto MIME types.

    -

    The directives In addition, mod_mime may define the handler and filters that originate and process + content. The directives AddHandler, AddOutputFilter, and AddInputFilter control the modules @@ -50,36 +46,20 @@ mod_negotiation to consider these file extensions to included when testing Multiviews matches.

    -

    The directive TypesConfig is used to specify a - file which also maps extensions onto MIME types. Most - administrators use the provided mime.types file which associates - common filename extensions with IANA registered content types. The - current list is maintained at - http://www.isi.edu/in-notes/iana/assignments/media-types/media-types. This - simplifies the httpd.conf file by providing the - majority of media-type definitions, and they may be overridden by - AddType directives as - needed.

    - - Please do not send requests to the Apache httpd Project - to add any new entries in the distributed mime.types file - unless (1) they are already registered with IANA, and (2) they - use widely accepted, non-conflicting filename extensions across - platforms. category/x-subtype requests will be automatically - rejected, as will any new two-letter extensions as they will - likely conflict later with the already crowded language and - character set namespace. - -

    The core directives ForceType and SetHandler are used to associate all the - files in a given container (e.g., location, director, or Files) with a particular - MIME-type or handler. These settings override any filename - extension mappings defined in mod_mime.

    +

    While mod_mime associates meta-information + with filename extensions, the core server + provides directives that are used to associate all the files in a + given container (e.g., location, directory, or Files) with particular + meta-information. These directives include ForceType, SetHandler, SetInputFilter, and SetOutputFilter. The core directives + override any filename extension mappings defined in + mod_mime.

    Note that changing the meta-information for a file does not change the value of the Last-Modified header. @@ -93,8 +73,9 @@ MimeMagicFile -DefaultType AddDefaultCharset +ForceType +DefaultType SetHandler SetInputFilter SetOutputFilter @@ -326,8 +307,6 @@ Content-Type: text/plain; charset=ISO-8859-2 be specified with or without a leading dot.

    -Files with - multiple extensions @@ -346,10 +325,12 @@ to the specified handler -

    This mapping is added to any already in - force, overriding any mappings that already exist for the same - extension. For example, to activate CGI scripts with - the file extension ".cgi", you might use:

    +

    Files having the named extension will be served by the +specified handler-name. This mapping is +added to any already in force, overriding any mappings that already +exist for the same extension. For example, to activate CGI +scripts with the file extension ".cgi", you might +use:

    AddHandler cgi-script .cgi @@ -363,9 +344,6 @@ to the specified handler be specified with or without a leading dot.

    - Files with - multiple extensions -Handlers SetHandler
    @@ -388,15 +366,14 @@ to the specified handler -

    AddInputFilter maps the filename extensions - extension to the filter or filters which will process +

    AddInputFilter maps the filename extensions extension + to the filters which will process client requests and POST input when they are received by the server. This is in addition to any filters defined elsewhere, including the SetInputFilter directive. - This mapping is merged over any already in force, overriding - any mappings that already exist for the same - extension.

    + This mapping is merged over any already in force, overriding any + mappings that already exist for the same extension.

    If more than one filter is specified, they must be separated by semicolons in the order in which they should process the @@ -405,9 +382,6 @@ to the specified handler without a leading dot.

    -Filters - documentation. -SetInputFilter @@ -469,8 +443,6 @@ to the specified content language be specified with or without a leading dot.

    -Files with - multiple extensions mod_negotiation @@ -494,21 +466,23 @@ responses from the server -

    The AddOutputFilter directive maps the filename - extensions extension to the filters which will process - responses from the server before they are sent to the client. - This is in addition to any filters defined elsewhere, including - the SetOutputFilter +

    The AddOutputFilter directive maps the + filename extensions extension to the filters which will process responses + from the server before they are sent to the client. This is in + addition to any filters defined elsewhere, including the + SetOutputFilter directive. This mapping is merged over any already in force, overriding any mappings that already exist for the same extension.

    For example, the following configuration will process all - .shtml files for server-side includes.

    + .shtml files for server-side includes and will then compress + the output using mod_deflate.

    -   AddOutputFilter INCLUDES shtml + AddOutputFilter INCLUDES;DEFLATE shtml

    If more than one filter is specified, they must be separated @@ -518,8 +492,6 @@ responses from the server without a leading dot.

    -Filters documentation -SetOutputFilter @@ -538,13 +510,13 @@ onto the specified content type -

    The AddType directive maps the given filename extensions - onto the specified content type. MIME-type is the MIME - type to use for filenames containing extension. This - mapping is added to any already in force, overriding any - mappings that already exist for the same extension. - This directive can be used to add mappings not listed in the - MIME types file (see the TypesConfig +

    The AddType directive maps the given filename extensions onto + the specified content type. MIME-type is the MIME type to + use for filenames containing extension. This mapping is + added to any already in force, overriding any mappings that + already exist for the same extension. This directive can + be used to add mappings not listed in the MIME types file (see the + TypesConfig directive).

    Example:

    @@ -557,16 +529,12 @@ onto the specified content type AddType directive rather than changing the TypesConfig file. - Note that, unlike the NCSA httpd, this directive cannot be - used to set the type of particular files. -

    The extension argument is case-insensitive, and can be specified with or without a leading dot.

    -Files with - multiple extensions DefaultType +ForceType
    @@ -611,8 +579,15 @@ searching for a matching file with MultiViews doesn't recognize the extension. This was the behavior in Apache 1.3, and can cause unpredicatable results, such as serving .old or .bak files the webmaster never expected to be served.

    + +

    For example, the following configuration will allow handlers + and filters to participate in Multviews, but will exclude unknown + files:

    + +MultiviewsMatch Handlers Filters + + -mod_negotiation Options
    @@ -651,9 +626,11 @@ specified language by AddLanguage, then that file will be considered to have no language attribute.

    +Example +DeafaultLanguage en + + -Files with - multiple extensions mod_negotiation @@ -680,6 +657,11 @@ extensions

    The extension argument is case-insensitive, and can be specified with or without a leading dot.

    + +Example +RemoveCharset .html .shtml + + @@ -800,6 +782,7 @@ extensions

    The extension argument is case-insensitive, and can be specified with or without a leading dot.

    + @@ -903,8 +886,6 @@ extensions - - TypesConfig The location of the mime.types file @@ -916,23 +897,43 @@ extensions -

    The TypesConfig directive sets the location of the MIME - types configuration file. Filename is relative to the - ServerRoot. This file sets - the default list of mappings from filename extensions to - content types; changing this file is not recommended. Use the - AddType directive instead. The file - contains lines in the format of the arguments to an AddType - command:

    +

    The TypesConfig directive sets the location of the MIME types + configuration file. Filename is relative to the ServerRoot. This file sets the + default list of mappings from filename extensions to content + types. Most administrators use the provided + mime.types file, which associates common filename + extensions with IANA registered content types. The current list is + maintained at + http://www.isi.edu/in-notes/iana/assignments/media-types/media-types. This + simplifies the httpd.conf file by providing the + majority of media-type definitions, and may be overridden by + AddType directives as + needed. You should not edit the mime.types file, + because it may be replaced when you upgrade your server.

    + +

    The file contains lines in the format of the arguments to + an AddType directive:

    MIME-type extension extension ...

    - The extensions are lower-cased. Blank lines, and lines + The case of the extension does not matter. Blank lines, and lines beginning with a hash character (`#') are ignored.

    + + Please do not send requests to the Apache HTTP Server Project + to add any new entries in the distributed mime.types file + unless (1) they are already registered with IANA, and (2) they + use widely accepted, non-conflicting filename extensions across + platforms. category/x-subtype requests will be automatically + rejected, as will any new two-letter extensions as they will + likely conflict later with the already crowded language and + character set namespace. +
    +mod_mime_magic
    -- 2.50.1