From c69b5aaa518f239b4e19cdf8a0a232b5dbc158c4 Mon Sep 17 00:00:00 2001 From: Rich Bowen Date: Sat, 25 Aug 2001 13:27:12 +0000 Subject: [PATCH] Additional details in mod_mime about what all this stuff means. Reviewed by: Joshua Slive git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90657 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_mime.html | 73 ++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/docs/manual/mod/mod_mime.html b/docs/manual/mod/mod_mime.html index aa359317cd..26e1427c07 100644 --- a/docs/manual/mod/mod_mime.html +++ b/docs/manual/mod/mod_mime.html @@ -8,7 +8,7 @@ @@ -118,6 +118,75 @@ extension is mapped to the MIME-type "text/html", then the file the "imap-file" handler will be used, and so it will be treated as a mod_imap imagemap file. +

Content encoding

+ +A file of a particular MIME type can additionally be encoded a +particular way to simplify transmission over the Internet. While this +usually will refer to compression, such as gzip, it can +also refer to encryption, such a pgp or +to an encoding such as UUencoding, which is designed for transmitting +a binary file in an ASCII (text) format.

+ +The MIME RFC puts it this way: +

+The Content-Encoding entity-header field is used as a modifier to the +media-type. When present, its value indicates what additional content +coding has been applied to the resource, and thus what decoding mechanism +must be applied in order to obtain the media-type referenced by the +Content-Type header field. The Content-Encoding is primarily used to allow +a document to be compressed without losing the identity of its underlying +media type. +
+ +By using more than one file extension (see +section above about multiple file +extensions), you can indicate that a file is of a particular +type, and also has a particular encoding.

+ +For example, you may have a file which is a Microsoft Word document, +which is pkzipped to reduce its size. If the .doc extension is +associated with the Microsoft Word file type, and the +.zip extension is associated with the pkzip file +encoding, then the file Resume.doc.zipwould be known to +be a pkzip'ed Word document.

+ +Apache send a Content-encoding header with the resource, +in order to tell the client browser about the encoding method. +

+Content-encoding: pkzip +

+

Character sets and languages

+ +Finally, in addition to file type, and the file encoding, +another important piece of information is +what language a particular document is in, and in what character set +the file should be displayed. For example, the document might be +written in the Vietnamese alphabet, or in Cyrillic, and should be +displayed as such. This information, also, is transmitted in MIME +headers.

+ +While the character set is useful for the browser, in order to +determine how to display the document, the language and the +character set are also used in the process of content negotiation +(See mod_negotiation) +to determine which document to give to the client, when there are +alternative documents in more than one language, or more than +one character set.

+ +To convey this further information, Apache optionally sends a +Content-Language header, to specify the language that the +document is in, and can append additional information onto the +Content-Type header to indicate the particular character +set that should be used to correctly render the information. + +

+Content-Language: en, fr
+Content-Type: text/plain; charset=ISO-8859-2
+
+

+The language specification is the two-letter abbreviation for the +language. The charset is the name of the particular +character set which should be used.


@@ -556,7 +625,7 @@ config files. An example of its use might be: </Files>

-This will cause foo.gz to mark as being encoded with the +This will cause foo.gz to be marked as being encoded with the gzip method, but foo.gz.asc as an unencoded plaintext file.

-- 2.40.0