From 7479dbc77dd6b5dbf09fd04baddab8e44d47603b Mon Sep 17 00:00:00 2001
From: "Roy T. Fielding" text/plain
or text/html
a default charset of iso-8859-1
. Any other value is assumed
to be the charset to be used, which should be one of the
IANA registered
- charset values for use in MIME media types.
+ charset values for use in Internet media types (MIME types).
For example:
text/plain
or text/html
text/plain
or text/html
This directive activates a particular output filter for a request depending on the
- response
text/plain
or text/html
Enabling filters with
However, if you want to make sure, that the filters will be
- applied, assign the content type to a resource explicitly, for
- example with
none
. In prior versions, DefaultType
+would specify a default media type to assign to response content for
+which no other media type configuration could be found.
+none
is available in Apache 2.2.7 and laternone
is available in Apache 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.There will be times when the server is asked to provide a
- document whose type cannot be determined by its
This directive has been disabled. For backwards compatibility
+ of configuration files, it may be specified with the value
+ none
, meaning no default media type. For example:
The server SHOULD inform the client of the content-type of the
- document. If the server is unable to determine this by normal
- means, it will set it to the configured
- DefaultType
. For example:
would be appropriate for a directory which contained many GIF
- images with filenames missing the .gif
extension.
In cases where it can neither be determined by the server nor - the administrator (e.g. a proxy), it is preferable to omit the MIME - type altogether rather than provide information that may be false. - This can be accomplished using
DefaultType None
is only available in httpd-2.2.7 and later.
Note that unlike
DefaultType None
is only available in
+ httpd-2.2.7 and later.
Use the mime.types configuration file and the
+
.gif
,
you might want to use:
@@ -1246,11 +1232,12 @@ MIME content-type
ForceType image/gif
Note that unlike
Note that this directive overrides other indirect media type
+ associations defined in mime.types or via the
+
You can override any
You can also override more general
+ None
:
This module is used to associate various bits of "meta - information" with files by their filename extensions. This - information relates the filename of the document to it's - mime-type, language, character set and encoding. This - information is sent to the browser, and participates in content - negotiation, so the user's preferences are respected when - choosing one of several possible files to serve. See +
This module is used to assign content metadata to the content
+ selected for an HTTP response by mapping patterns in the
+ URI or filenames to the metadata values. For example, the filename
+ extensions of content files often define the content's Internet
+ media type, language, character set, and content-encoding. This
+ information is sent in HTTP messages containing that content and
+ used in content negotiation when selecting alternatives, such that
+ the user's preferences are respected when choosing one of several
+ possible contents to serve. See
In addition,
While
While
Note that changing the meta-information for a file does not +
Note that changing the metadata for a file does not
change the value of the Last-Modified
header.
Thus, previously cached copies may still be used by a client or
proxy, with the previous headers. If you change the
- meta-information (language, content type, character set or
+ metadata (language, content type, character set or
encoding) you may need to 'touch' affected files (updating
their last modified date) to ensure that all visitors are
receive the corrected content headers.
Files can have more than one extension, and the order of the +
Files can have more than one extension; the order of the
extensions is normally irrelevant. For example, if the
file welcome.html.fr
maps onto content type
text/html
and language French then the file
welcome.fr.html
will map onto exactly the same
information. If more than one extension is given that maps onto
- the same type of meta-information, then the one to the right will
+ the same type of metadata, then the one to the right will
be used, except for languages and content encodings. For example,
- if .gif
maps to the .gif
maps to the image/gif
and .html
maps to the
- MIME-type text/html
, then the file
+ media-type text/html
, then the file
welcome.gif.html
will be associated with the
- MIME-type text/html
.
text/html
.
Languages and content encodings are treated accumulative, because one can assign @@ -121,14 +122,15 @@ module="mod_mime_magic">MimeMagicFile text/html.
Care should be taken when a file with multiple extensions
- gets associated with both a .imap
extension is mapped to the handler imap-file
(from
.html
extension is
- mapped to the MIME-type text/html
, then the file
+ mapped to the media-type text/html
, then the file
world.imap.html
will be associated with both the
- imap-file
handler and text/html
MIME-type.
+ imap-file
handler and text/html
media-type.
When it is processed, the imap-file
handler will be used,
and so it will be treated as a
A file of a particular
A file of a particular The The gzip
, it can also refer to encryption, such a
@@ -252,9 +254,10 @@ charset
AddEncoding
directive. To make this long story
short, you should always use x-gzip
and
x-compress
for these two specific encodings. More
- recent encodings, such as deflate
should be
+ recent encodings, such as deflate
, should be
specified without the x-
.
The extension argument is case-insensitive and can
@@ -411,7 +415,7 @@ later.
The The
The .fr
or .de
as configured
by
If no
If no
The .htaccess
files in
subdirectories to undo any associations inherited from parent
directories or the server config files. An example of its use
@@ -888,8 +893,8 @@ extensions
This will remove any special handling of .cgi
files in the /foo/
directory and any beneath it,
- causing the files to be treated as being of the
The The case of the extension does not matter. Blank lines, and lines
diff --git a/docs/manual/mod/mod_proxy_ftp.xml b/docs/manual/mod/mod_proxy_ftp.xml
index a6ea79a54b..133407793b 100644
--- a/docs/manual/mod/mod_proxy_ftp.xml
+++ b/docs/manual/mod/mod_proxy_ftp.xml
@@ -59,7 +59,7 @@
mime.types
file, which associates common filename
- extensions with IANA registered content types. The current list is
+ extensions with the official list of IANA registered media types
maintained at http://www.iana.org/assignments/media-types/index.html. This
+ >http://www.iana.org/assignments/media-types/index.html
+ as well as a large number of unofficial types. This
simplifies the httpd.conf
file by providing the
majority of media-type definitions, and may be overridden by
Alternatively you may prefer to default everything to binary:
DefaultType application/octet-stream+
ForceType application/octet-stream