Ignore:
Timestamp:
Aug 4, 2008, 3:20:21 AM (11 years ago)
Author:
julian.reschke@…
Message:

Resolve #113: refer to RFC4647 for definition of language ranges and matching (closes #113).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p3-payload.html

    r301 r303  
    2222  font-style: normal;
    2323}
     24blockquote {
     25  border-style: solid;
     26  border-color: gray;
     27  border-width: 0 0 0 .25em;
     28  font-style: italic;
     29  padding-left: 0.5em;
     30}
    2431body {
    2532  color: black;
     
    238245  text-transform: lowercase;
    239246  font-variant: small-caps;
     247}
     248blockquote > * .bcp14 {
     249  font-style: italic;
    240250}
    241251.comment {
     
    474484         <tr>
    475485            <td class="header left"></td>
    476             <td class="header right">August 1, 2008</td>
     486            <td class="header right">August 4, 2008</td>
    477487         </tr>
    478488      </table>
     
    10861096      <div id="rfc.figure.u.28"></div><pre class="inline"><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span>  <a href="#header.accept-language" class="smpl">Accept-Language</a> = "Accept-Language" ":"
    10871097                    1#( <a href="#header.accept-language" class="smpl">language-range</a> [ ";" "q" "=" <a href="#quality.values" class="smpl">qvalue</a> ] )
    1088   <a href="#header.accept-language" class="smpl">language-range</a>  = ( ( 1*8<a href="#notation" class="smpl">ALPHA</a> *( "-" 1*8<a href="#notation" class="smpl">ALPHA</a> ) ) | "*" )
    1089 </pre><p id="rfc.section.6.4.p.3">Each language-range <em class="bcp14">MAY</em> be given an associated quality value which represents an estimate of the user's preference for the languages specified by
    1090          that range. The quality value defaults to "q=1". For example,
     1098  <a href="#header.accept-language" class="smpl">language-range</a>  =
     1099            &lt;language-range, defined in <a href="#RFC4647" id="rfc.xref.RFC4647.1"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, <a href="http://tools.ietf.org/html/rfc4647#section-2.1">Section 2.1</a>&gt;
     1100</pre><p id="rfc.section.6.4.p.3">Each language-range can be given an associated quality value which represents an estimate of the user's preference for the
     1101         languages specified by that range. The quality value defaults to "q=1". For example,
    10911102      </p>
    10921103      <div id="rfc.figure.u.29"></div><pre class="text">    Accept-Language: da, en-gb;q=0.8, en;q=0.7
    1093 </pre><p id="rfc.section.6.4.p.5">would mean: "I prefer Danish, but will accept British English and other types of English." A language-range matches a language-tag
    1094          if it exactly equals the tag, or if it exactly equals a prefix of the tag such that the first tag character following the
    1095          prefix is "-". The special range "*", if present in the Accept-Language field, matches every tag not matched by any other
    1096          range present in the Accept-Language field.
     1104</pre><p id="rfc.section.6.4.p.5">would mean: "I prefer Danish, but will accept British English and other types of English."</p>
     1105      <p id="rfc.section.6.4.p.6">For matching, the "Basic Filtering" matching scheme, defined in <a href="http://tools.ietf.org/html/rfc4647#section-3.3.1">Section 3.3.1</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.2"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, is used:
     1106      </p>
     1107      <blockquote id="rfc.section.6.4.p.7" cite="http://tools.ietf.org/html/rfc4647#section-3.3.1">
     1108         <p>A language range matches a particular language tag if, in a case-insensitive comparison, it exactly equals the tag, or if
     1109            it exactly equals a prefix of the tag such that the first character following the prefix is "-".
     1110         </p>
     1111      </blockquote>
     1112      <p id="rfc.section.6.4.p.8">The special range "*", if present in the Accept-Language field, matches every tag not matched by any other range present in
     1113         the Accept-Language field.
    10971114      </p>
    10981115      <dl class="empty">
     
    11021119         </dd>
    11031120      </dl>
    1104       <p id="rfc.section.6.4.p.6">The language quality factor assigned to a language-tag by the Accept-Language field is the quality value of the longest language-range
     1121      <p id="rfc.section.6.4.p.9">The language quality factor assigned to a language-tag by the Accept-Language field is the quality value of the longest language-range
    11051122         in the field that matches the language-tag. If no language-range in the field matches the tag, the language quality factor
    11061123         assigned is 0. If no Accept-Language header is present in the request, the server <em class="bcp14">SHOULD</em> assume that all languages are equally acceptable. If an Accept-Language header is present, then all languages which are assigned
    11071124         a quality factor greater than 0 are acceptable.
    11081125      </p>
    1109       <p id="rfc.section.6.4.p.7">It might be contrary to the privacy expectations of the user to send an Accept-Language header with the complete linguistic
     1126      <p id="rfc.section.6.4.p.10">It might be contrary to the privacy expectations of the user to send an Accept-Language header with the complete linguistic
    11101127         preferences of the user in every request. For a discussion of this issue, see <a href="#privacy.issues.connected.to.accept.headers" title="Privacy Issues Connected to Accept Headers">Section&nbsp;8.1</a>.
    11111128      </p>
    1112       <p id="rfc.section.6.4.p.8">As intelligibility is highly dependent on the individual user, it is recommended that client applications make the choice
     1129      <p id="rfc.section.6.4.p.11">As intelligibility is highly dependent on the individual user, it is recommended that client applications make the choice
    11131130         of linguistic preference available to the user. If the choice is not made available, then the Accept-Language header field <em class="bcp14">MUST NOT</em> be given in the request.
    11141131      </p>
     
    13671384      <h2 id="rfc.references.1"><a href="#rfc.section.10.1" id="rfc.section.10.1">10.1</a> Normative References
    13681385      </h2>
    1369       <table summary="Normative References">                           
     1386      <table summary="Normative References">                             
    13701387         <tr>
    13711388            <td class="reference"><b id="ISO-8859-1">[ISO-8859-1]</b></td>
     
    14411458            <td class="reference"><b id="RFC2119">[RFC2119]</b></td>
    14421459            <td class="top"><a title="Harvard University">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.
     1460            </td>
     1461         </tr>
     1462         <tr>
     1463            <td class="reference"><b id="RFC4647">[RFC4647]</b></td>
     1464            <td class="top"><a title="Yahoo! Inc.">Phillips, A., Ed.</a> and <a title="Google">M. Davis, Ed.</a>, “<a href="http://tools.ietf.org/html/rfc4647">Matching of Language Tags</a>”, BCP&nbsp;47, RFC&nbsp;4647, September&nbsp;2006.
    14431465            </td>
    14441466         </tr>
     
    17021724      <ul>
    17031725         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/67">http://tools.ietf.org/wg/httpbis/trac/ticket/67</a>&gt;: "Quoting Charsets"
     1726         </li>
     1727         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/113">http://tools.ietf.org/wg/httpbis/trac/ticket/113</a>&gt;: "language tag matching (Accept-Language) vs RFC4647"
    17041728         </li>
    17051729         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/121">http://tools.ietf.org/wg/httpbis/trac/ticket/121</a>&gt;: "RFC 1806 has been replaced by RFC2183"
     
    19201944                  <li class="indline1"><em>RFC3864</em>&nbsp;&nbsp;<a class="iref" href="#rfc.xref.RFC3864.1">7.1</a>, <a class="iref" href="#RFC3864"><b>10.2</b></a></li>
    19211945                  <li class="indline1"><em>RFC4288</em>&nbsp;&nbsp;<a class="iref" href="#rfc.xref.RFC4288.1">3.3</a>, <a class="iref" href="#RFC4288"><b>10.2</b></a></li>
     1946                  <li class="indline1"><em>RFC4647</em>&nbsp;&nbsp;<a class="iref" href="#rfc.xref.RFC4647.1">6.4</a>, <a class="iref" href="#rfc.xref.RFC4647.2">6.4</a>, <a class="iref" href="#RFC4647"><b>10.1</b></a><ul class="ind">
     1947                        <li class="indline1"><em>Section 2.1</em>&nbsp;&nbsp;<a class="iref" href="#rfc.xref.RFC4647.1">6.4</a></li>
     1948                        <li class="indline1"><em>Section 3.3.1</em>&nbsp;&nbsp;<a class="iref" href="#rfc.xref.RFC4647.2">6.4</a></li>
     1949                     </ul>
     1950                  </li>
    19221951               </ul>
    19231952            </li>
Note: See TracChangeset for help on using the changeset viewer.