Ignore:
Timestamp:
19/08/12 09:46:53 (8 years ago)
Author:
fielding@…
Message:

clean up TE, move qvalues to p2, and make its usage consistent for accept(-*)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p2-semantics.xml

    r1825 r1831  
    4747  <!ENTITY header-cache-control       "<xref target='Part6' x:rel='#header.cache-control' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    4848  <!ENTITY header-connection          "<xref target='Part1' x:rel='#header.connection' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     49  <!ENTITY header-content-length      "<xref target='Part1' x:rel='#header.content-length' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    4950  <!ENTITY header-content-location    "<xref target='header.content-location' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    5051  <!ENTITY header-content-range       "<xref target='Part5' x:rel='#header.content-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     
    5960  <!ENTITY header-if-range            "<xref target='Part5' x:rel='#header.if-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    6061  <!ENTITY header-if-unmodified-since "<xref target='Part4' x:rel='#header.if-unmodified-since' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     62  <!ENTITY header-last-modified       "<xref target='Part4' x:rel='#header.last-modified' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    6163  <!ENTITY header-pragma              "<xref target='Part6' x:rel='#header.pragma' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    6264  <!ENTITY header-proxy-authenticate  "<xref target='Part7' x:rel='#header.proxy-authenticate' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    6365  <!ENTITY header-proxy-authorization "<xref target='Part7' x:rel='#header.proxy-authorization' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    6466  <!ENTITY header-range               "<xref target='Part5' x:rel='#header.range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     67  <!ENTITY header-te                  "<xref target='Part1' x:rel='#header.te' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     68  <!ENTITY header-transfer-encoding   "<xref target='Part1' x:rel='#header.transfer-encoding' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    6569  <!ENTITY header-upgrade             "<xref target='Part1' x:rel='#header.upgrade' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    66   <!ENTITY header-te                  "<xref target='Part1' x:rel='#header.te' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     70  <!ENTITY header-user-agent          "<xref target='header.user-agent' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    6771  <!ENTITY header-vary                "<xref target='Part6' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    6872  <!ENTITY header-via                 "<xref target='Part1' x:rel='#header.via' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     
    8589  <!ENTITY p6-invalid                 "<xref target='Part6' x:rel='#invalidation.after.updates.or.deletions' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    8690  <!ENTITY p6-head                    "<xref target='Part6' x:rel='#head.effects' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     91  <!ENTITY qvalue                     "<xref target='quality.values'/>">
    8792  <!ENTITY architecture               "<xref target='Part1' x:rel='#architecture' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    8893  <!ENTITY notation                   "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     
    9297  <!ENTITY field-components           "<xref target='Part1' x:rel='#field.components' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    9398  <!ENTITY caching-neg-resp           "<xref target='Part6' x:rel='#caching.negotiated.responses' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    94   <!ENTITY header-transfer-encoding   "<xref target='Part1' x:rel='#header.transfer-encoding' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    95   <!ENTITY header-content-length      "<xref target='Part1' x:rel='#header.content-length' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    96   <!ENTITY header-content-range       "<xref target='Part5' x:rel='#header.content-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    97   <!ENTITY header-etag                "<xref target='Part4' x:rel='#header.etag' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    98   <!ENTITY header-expires             "<xref target='Part6' x:rel='#header.expires' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    99   <!ENTITY header-last-modified       "<xref target='Part4' x:rel='#header.last-modified' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    100   <!ENTITY header-user-agent          "<xref target='header.user-agent' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    101   <!ENTITY header-vary                "<xref target='Part6' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    10299  <!ENTITY message-body               "<xref target='Part1' x:rel='#message.body' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    103100  <!ENTITY multipart-byteranges       "<xref target='Part5' x:rel='#internet.media.type.multipart.byteranges' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    104101  <!ENTITY http-date                  "<xref target='http.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    105   <!ENTITY qvalue                     "<xref target='Part1' x:rel='#quality.values' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    106102  <!ENTITY uri                        "<xref target='Part1' x:rel='#uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    107103  <!ENTITY effective-request-uri      "<xref target='Part1' x:rel='#effective.request.uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     
    28172813</t>
    28182814<t>
    2819    Note that in all cases, the supplier of representations has the
     2815   Note that, in all cases, the supplier of representations has the
    28202816   responsibility for determining which representations might be
    28212817   considered to be the "same information".
     
    28752871   sending a response that doesn't conform to them is better than sending a <x:ref>406
    28762872   (Not Acceptable)</x:ref> response.
    2877 </t>
    2878 <t>
    2879    Many of the mechanisms for expressing preferences use quality values to
    2880    declare relative preference. See &qvalue; for more information.
    28812873</t>
    28822874<t>
     
    29422934</t>
    29432935</section>
     2936
     2937<section title="Quality Values" anchor="quality.values">
     2938  <x:anchor-alias value="weight"/>
     2939  <x:anchor-alias value="qvalue"/>
     2940<t>
     2941   Many of the request header fields for server-driven content negotiation
     2942   use a common parameter, named "q", to assign a relative "weight" to the
     2943   preference for that associated kind of content.
     2944   This weight is referred to as a "quality value" (or "qvalue") because
     2945   the same parameter name is often used within server configurations to
     2946   assign a weight to the relative quality of the various representations
     2947   that can be selected for a resource.
     2948</t>
     2949<t>
     2950   The weight is normalized to a real number in the range 0 through 1,
     2951   where 0.001 is the least preferred and 1 is the most preferred;
     2952   a value of 0 means "not acceptable". If no "q" parameter is present,
     2953   the default weight is 1.
     2954</t>
     2955<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="weight"/><iref primary="true" item="Grammar" subitem="qvalue"/>
     2956  <x:ref>weight</x:ref> = <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> "q=" <x:ref>qvalue</x:ref>
     2957  <x:ref>qvalue</x:ref> = ( "0" [ "." 0*3<x:ref>DIGIT</x:ref> ] )
     2958         / ( "1" [ "." 0*3("0") ] )
     2959</artwork></figure>
     2960<t>
     2961   A sender of qvalue &MUST-NOT; generate more than three digits after the
     2962   decimal point. User configuration of these values ought to be limited in
     2963   the same fashion.
     2964</t>
     2965</section>
    29442966</section>
    29452967
     
    29712993                   / ( <x:ref>type</x:ref> "/" <x:ref>subtype</x:ref> )
    29722994                   ) *( <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> <x:ref>parameter</x:ref> )
    2973   <x:ref>accept-params</x:ref>  = <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> "q=" <x:ref>qvalue</x:ref> *( <x:ref>accept-ext</x:ref> )
     2995  <x:ref>accept-params</x:ref>  = <x:ref>weight</x:ref> *( <x:ref>accept-ext</x:ref> )
    29742996  <x:ref>accept-ext</x:ref>     = <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> <x:ref>token</x:ref> [ "=" <x:ref>word</x:ref> ]
    29752997</artwork></figure>
     
    29823004<t>
    29833005   Each media-range &MAY; be followed by one or more accept-params,
    2984    beginning with the "q" parameter for indicating a relative quality
    2985    factor. The first "q" parameter (if any) separates the media-range
    2986    parameter(s) from the accept-params. Quality factors allow the user
    2987    or user agent to indicate the relative degree of preference for that
    2988    media-range, using the qvalue scale from 0 to 1 (&qvalue;). The
    2989    default value is q=1.
     3006   beginning with the "q" parameter for indicating a relative weight,
     3007   as defined in &qvalue;.
     3008   The first "q" parameter (if any) separates the media-range
     3009   parameter(s) from the accept-params.
    29903010</t>
    29913011<x:note>
     
    30933113</t>
    30943114<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Charset"/>
    3095   <x:ref>Accept-Charset</x:ref> = 1#( ( <x:ref>charset</x:ref> / "*" )
    3096                          [ <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> "q=" <x:ref>qvalue</x:ref> ] )
     3115  <x:ref>Accept-Charset</x:ref> = 1#( ( <x:ref>charset</x:ref> / "*" ) [ <x:ref>weight</x:ref> ] )
    30973116</artwork></figure>
    30983117<t>
     
    31003119   <xref target="character.sets"/>. Each charset &MAY; be given an
    31013120   associated quality value which represents the user's preference
    3102    for that charset. The default value is q=1. An example is
     3121   for that charset, as defined in &qvalue;.
     3122   An example is
    31033123</t>
    31043124<figure><artwork type="example">
     
    31083128   The special value "*", if present in the Accept-Charset field,
    31093129   matches every character encoding which is not mentioned elsewhere in the
    3110    Accept-Charset field. If no "*" is present in an Accept-Charset field, then
    3111    all character encodings not explicitly mentioned get a quality value of 0.
     3130   Accept-Charset field. If no "*" is present in an Accept-Charset field,
     3131   then any character encodings not explicitly mentioned in the field are
     3132   considered "not acceptable" to the client.
    31123133</t>
    31133134<t>
    31143135   A request without any Accept-Charset header field implies that the user
    31153136   agent will accept any character encoding in response.
     3137</t>
     3138<t>
    31163139   If an Accept-Charset header field is present in a request and none of the
    31173140   available representations for the response have a character encoding that
     
    31353158</t>
    31363159<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Encoding"/><iref primary="true" item="Grammar" subitem="codings"/>
    3137   <x:ref>Accept-Encoding</x:ref>  = #( <x:ref>codings</x:ref> [ <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> "q=" <x:ref>qvalue</x:ref> ] )
     3160  <x:ref>Accept-Encoding</x:ref>  = #( <x:ref>codings</x:ref> [ <x:ref>weight</x:ref> ] )
    31383161  <x:ref>codings</x:ref>          = <x:ref>content-coding</x:ref> / "identity" / "*"
    31393162</artwork></figure>
    31403163<t>
    31413164   Each codings value &MAY; be given an associated quality value which
    3142    represents the preference for that encoding. The default value is q=1.
     3165   represents the preference for that encoding, as defined in &qvalue;.
    31433166</t>
    31443167<t>
     
    31843207<t>
    31853208   A request without an Accept-Encoding header field implies that the user
    3186    agent will accept any content-coding in response, but a representation
    3187    without content-coding is preferred for compatibility with the widest
    3188    variety of user agents.
     3209   agent will accept any content-coding in response.
    31893210</t>
    31903211<x:note>
     
    32083229</t>
    32093230<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Language"/><iref primary="true" item="Grammar" subitem="language-range"/>
    3210   <x:ref>Accept-Language</x:ref> =
    3211                     1#( <x:ref>language-range</x:ref> [ <x:ref>OWS</x:ref> ";" <x:ref>OWS</x:ref> "q=" <x:ref>qvalue</x:ref> ] )
     3231  <x:ref>Accept-Language</x:ref> = 1#( <x:ref>language-range</x:ref> [ <x:ref>weight</x:ref> ] )
    32123232  <x:ref>language-range</x:ref>  =
    32133233            &lt;language-range, defined in <xref target="RFC4647" x:fmt="," x:sec="2.1"/>&gt;
     
    32163236   Each language-range can be given an associated quality value which
    32173237   represents an estimate of the user's preference for the languages
    3218    specified by that range. The quality value defaults to "q=1". For
    3219    example,
     3238   specified by that range, as defined in &qvalue;. For example,
    32203239</t>
    32213240<figure><artwork type="example">
     
    55755594  <x:anchor-alias value="comment"/>
    55765595  <x:anchor-alias value="partial-URI"/>
    5577   <x:anchor-alias value="qvalue"/>
    55785596  <x:anchor-alias value="URI-reference"/>
    55795597<t>
     
    56005618  <x:ref>comment</x:ref>       = &lt;comment, defined in &field-components;&gt;
    56015619  <x:ref>partial-URI</x:ref>   = &lt;partial-URI, defined in &uri;&gt;
    5602   <x:ref>qvalue</x:ref>        = &lt;qvalue, defined in &qvalue;&gt;
    56035620  <x:ref>URI-reference</x:ref> = &lt;URI-reference, defined in &uri;&gt;
    56045621</artwork></figure>
     
    56115628<x:ref>Accept</x:ref> = [ ( "," / ( media-range [ accept-params ] ) ) *( OWS "," [
    56125629 OWS ( media-range [ accept-params ] ) ] ) ]
    5613 <x:ref>Accept-Charset</x:ref> = *( "," OWS ) ( ( charset / "*" ) [ OWS ";" OWS "q="
    5614  qvalue ] ) *( OWS "," [ OWS ( ( charset / "*" ) [ OWS ";" OWS "q="
    5615  qvalue ] ) ] )
    5616 <x:ref>Accept-Encoding</x:ref> = [ ( "," / ( codings [ OWS ";" OWS "q=" qvalue ] ) )
    5617  *( OWS "," [ OWS ( codings [ OWS ";" OWS "q=" qvalue ] ) ] ) ]
    5618 <x:ref>Accept-Language</x:ref> = *( "," OWS ) ( language-range [ OWS ";" OWS "q="
    5619  qvalue ] ) *( OWS "," [ OWS ( language-range [ OWS ";" OWS "q="
    5620  qvalue ] ) ] )
     5630<x:ref>Accept-Charset</x:ref> = *( "," OWS ) ( ( charset / "*" ) [ weight ] ) *( OWS
     5631 "," [ OWS ( ( charset / "*" ) [ weight ] ) ] )
     5632<x:ref>Accept-Encoding</x:ref> = [ ( "," / ( codings [ weight ] ) ) *( OWS "," [ OWS
     5633 ( codings [ weight ] ) ] ) ]
     5634<x:ref>Accept-Language</x:ref> = *( "," OWS ) ( language-range [ weight ] ) *( OWS
     5635 "," [ OWS ( language-range [ weight ] ) ] )
    56215636<x:ref>Allow</x:ref> = [ ( "," / method ) *( OWS "," [ OWS method ] ) ]
    56225637
     
    56585673<x:ref>absolute-URI</x:ref> = &lt;absolute-URI, defined in [Part1], Section 2.8&gt;
    56595674<x:ref>accept-ext</x:ref> = OWS ";" OWS token [ "=" word ]
    5660 <x:ref>accept-params</x:ref> = OWS ";" OWS "q=" qvalue *accept-ext
     5675<x:ref>accept-params</x:ref> = weight *accept-ext
    56615676<x:ref>asctime-date</x:ref> = day-name SP date3 SP time-of-day SP year
    56625677<x:ref>attribute</x:ref> = token
     
    57255740
    57265741<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 3.2.4&gt;
    5727 <x:ref>qvalue</x:ref> = &lt;qvalue, defined in [Part1], Section 4.3.1&gt;
     5742<x:ref>qvalue</x:ref> = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
    57285743
    57295744<x:ref>rfc1123-date</x:ref> = day-name "," SP date1 SP time-of-day SP GMT
     
    57395754<x:ref>value</x:ref> = word
    57405755
     5756<x:ref>weight</x:ref> = OWS ";" OWS "q=" qvalue
    57415757<x:ref>word</x:ref> = &lt;word, defined in [Part1], Section 3.2.4&gt;
    57425758
Note: See TracChangeset for help on using the changeset viewer.