You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ig...@apache.org on 2010/09/18 23:41:05 UTC

svn commit: r998553 - in /httpd/httpd/trunk/docs/manual/mod: mod_mime.html.en mod_mime.xml

Author: igalic
Date: Sat Sep 18 21:41:04 2010
New Revision: 998553

URL: http://svn.apache.org/viewvc?rev=998553&view=rev
Log:
Explanation on how to prioritize mime-types on the serverside with AddType.

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_mime.html.en
    httpd/httpd/trunk/docs/manual/mod/mod_mime.xml

Modified: httpd/httpd/trunk/docs/manual/mod/mod_mime.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_mime.html.en?rev=998553&r1=998552&r2=998553&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_mime.html.en (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_mime.html.en Sat Sep 18 21:41:04 2010
@@ -537,8 +537,13 @@ type</td></tr>
     type</a> to use for filenames containing
     <var>extension</var>. This mapping is added to any already in
     force, overriding any mappings that already exist for the same
-    <var>extension</var>. This directive can be used to add mappings
-    not listed in the media types file (see the <code class="directive"><a href="#typesconfig">TypesConfig</a></code> directive).</p>
+    <var>extension</var>.</p>
+
+    <div class="note">
+      It is recommended that new media types be added using the
+      <code class="directive">AddType</code> directive rather than changing the 
+      <code class="directive"><a href="#typesconfig">TypesConfig</a></code> file.
+    </div>
     
     <div class="example"><h3>Example</h3><p><code>
       AddType image/gif .gif
@@ -550,17 +555,24 @@ type</td></tr>
       AddType image/jpeg jpeg jpg jpe
     </code></p></div>
 
-    <div class="note">
-      It is recommended that new media types be added using the
-      <code class="directive">AddType</code> directive rather than changing the 
-      <code class="directive"><a href="#typesconfig">TypesConfig</a></code> file.
-    </div>
-
     <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot. Filenames may have <a href="#multipleext">multiple extensions</a> and the
     <var>extension</var> argument will be compared against each of
     them.</p>
 
+    <p>A simmilar effect to <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>'s
+    <code class="directive"><a href="../mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>
+    can be achieved by qualifying a <var>media-type</var> with
+    <code>qs</code>:</p>
+
+    <div class="example"><h3>Example</h3><p><code>
+      Addtype application/rss+xml;qs=0.8 .xml
+    </code></p></div>
+
+    <p>This is useful in situations, <em>e.g.</em> when a client
+    requesting <code>Accept: */*</code> can not actually processes
+    the content returned by the server.</p>
+
     <p>This directive primarily configures the content types generated for
     static files served out of the filesystem.  For resources other than 
     static files, where the generator of the response typically specifies 
@@ -570,6 +582,7 @@ type</td></tr>
 <h3>See also</h3>
 <ul>
 <li><code class="directive"><a href="../mod/core.html#forcetype">ForceType</a></code></li>
+<li><code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code></li>
 </ul>
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>

Modified: httpd/httpd/trunk/docs/manual/mod/mod_mime.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_mime.xml?rev=998553&r1=998552&r2=998553&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_mime.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_mime.xml Sat Sep 18 21:41:04 2010
@@ -529,9 +529,13 @@ type</description>
     type</glossary> to use for filenames containing
     <var>extension</var>. This mapping is added to any already in
     force, overriding any mappings that already exist for the same
-    <var>extension</var>. This directive can be used to add mappings
-    not listed in the media types file (see the <directive
-    module="mod_mime">TypesConfig</directive> directive).</p>
+    <var>extension</var>.</p>
+
+    <note>
+      It is recommended that new media types be added using the
+      <directive>AddType</directive> directive rather than changing the 
+      <directive module="mod_mime">TypesConfig</directive> file.
+    </note>
     
     <example><title>Example</title>
       AddType image/gif .gif
@@ -543,18 +547,25 @@ type</description>
       AddType image/jpeg jpeg jpg jpe
     </example>
 
-    <note>
-      It is recommended that new media types be added using the
-      <directive>AddType</directive> directive rather than changing the 
-      <directive module="mod_mime">TypesConfig</directive> file.
-    </note>
-
     <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot. Filenames may have <a
     href="#multipleext">multiple extensions</a> and the
     <var>extension</var> argument will be compared against each of
     them.</p>
 
+    <p>A simmilar effect to <module>mod_negotiation</module>'s
+    <directive module="mod_negotiation">LanguagePriority</directive>
+    can be achieved by qualifying a <var>media-type</var> with
+    <code>qs</code>:</p>
+
+    <example><title>Example</title>
+      Addtype application/rss+xml;qs=0.8 .xml
+    </example>
+
+    <p>This is useful in situations, <em>e.g.</em> when a client
+    requesting <code>Accept: */*</code> can not actually processes
+    the content returned by the server.</p>
+
     <p>This directive primarily configures the content types generated for
     static files served out of the filesystem.  For resources other than 
     static files, where the generator of the response typically specifies 
@@ -562,6 +573,7 @@ type</description>
 
 </usage>
 <seealso><directive module="core">ForceType</directive></seealso>
+<seealso><module>mod_negotiation</module></seealso>
 </directivesynopsis>
 
 <directivesynopsis>