Ticket #155: 155.2.diff

File 155.2.diff, 18.3 KB (added by julian.reschke@…, 9 years ago)

proposed change for part 3

  • p3-payload.xml

     
    721721  entity-body := Content-Encoding( Content-Type( data ) )
    722722</artwork></figure>
    723723<t>
    724    Content-Type specifies the media type of the underlying data.
     724   Content-Type specifies the media type of the underlying data. Any HTTP/1.1
     725   message containing an entity-body &SHOULD; include a Content-Type header
     726   field defining the media type of that body, unless that information is
     727   unknown.  If the Content-Type header field is not present, it indicates that
     728   the sender does not know the media type of the data; recipients &MAY;
     729   either assume that it is "application/octet-stream" (<xref target="RFC2046" x:fmt="," x:sec="4.5.1"/>)
     730   or examine the content to determine its type.
     731</t>
     732<t>
    725733   Content-Encoding may be used to indicate any additional content
    726734   codings applied to the data, usually for the purpose of data
    727    compression, that are a property of the requested resource. There is
     735   compression, that are a property of the requested resource.  There is
    728736   no default encoding.
    729737</t>
    730738<t>
    731    Any HTTP/1.1 message containing an entity-body &SHOULD; include a
    732    Content-Type header field defining the media type of that body. If
    733    and only if the media type is not given by a Content-Type field, the
    734    recipient &MAY; attempt to guess the media type via inspection of its
    735    content and/or the name extension(s) of the URI used to identify the
    736    resource. If the media type remains unknown, the recipient &SHOULD;
    737    treat it as type "application/octet-stream" (<xref target="RFC2046" x:fmt="," x:sec="4.5.1"/>).
     739   Note that neither the interpretation of the data type of a message nor
     740   the behaviors caused by it are defined by HTTP; this
     741   potentially includes examination of the content to override any
     742   indicated type ("sniffing")<iref item="Content Type Sniffing"/>.
    738743</t>
    739744</section>
    740745   
     
    29592964      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/80"/>:
    29602965      "Content-Location isn't special"
    29612966    </t>
     2967    <t>
     2968      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/155"/>:
     2969      "Content Sniffing"
     2970    </t>
    29622971  </list>
    29632972</t>
    29642973</section>
  • p3-payload.html

     
    477477         </tr>
    478478         <tr>
    479479            <td class="header left"></td>
    480             <td class="header right">June 1, 2009</td>
     480            <td class="header right">June 7, 2009</td>
    481481         </tr>
    482482      </table>
    483483      <p class="title">HTTP/1.1, part 3: Message Payload and Content Negotiation<br><span class="filename">draft-ietf-httpbis-p3-payload-latest</span></p>
     
    862862         and Content-Encoding. These define a two-layer, ordered encoding model:
    863863      </p>
    864864      <div id="rfc.figure.u.14"></div><pre class="text">  entity-body := Content-Encoding( Content-Type( data ) )
    865 </pre><p id="rfc.section.3.2.1.p.3">Content-Type specifies the media type of the underlying data. Content-Encoding may be used to indicate any additional content
    866          codings applied to the data, usually for the purpose of data compression, that are a property of the requested resource. There
    867          is no default encoding.
     865</pre><p id="rfc.section.3.2.1.p.3">Content-Type specifies the media type of the underlying data. Any HTTP/1.1 message containing an entity-body <em class="bcp14">SHOULD</em> include a Content-Type header field defining the media type of that body, unless that information is unknown. If the Content-Type
     866         header field is not present, it indicates that the sender does not know the media type of the data; recipients <em class="bcp14">MAY</em> either assume that it is "application/octet-stream" (<a href="#RFC2046" id="rfc.xref.RFC2046.3"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, <a href="http://tools.ietf.org/html/rfc2046#section-4.5.1">Section 4.5.1</a>) or examine the content to determine its type.
    868867      </p>
    869       <p id="rfc.section.3.2.1.p.4">Any HTTP/1.1 message containing an entity-body <em class="bcp14">SHOULD</em> include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a
    870          Content-Type field, the recipient <em class="bcp14">MAY</em> attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the
    871          resource. If the media type remains unknown, the recipient <em class="bcp14">SHOULD</em> treat it as type "application/octet-stream" (<a href="#RFC2046" id="rfc.xref.RFC2046.3"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, <a href="http://tools.ietf.org/html/rfc2046#section-4.5.1">Section 4.5.1</a>).
     868      <p id="rfc.section.3.2.1.p.4">Content-Encoding may be used to indicate any additional content codings applied to the data, usually for the purpose of data
     869         compression, that are a property of the requested resource. There is no default encoding.
    872870      </p>
     871      <p id="rfc.section.3.2.1.p.5">Note that neither the interpretation of the data type of a message nor the behaviors caused by it are defined by HTTP; this
     872         potentially includes examination of the content to override any indicated type ("sniffing")<span id="rfc.iref.c.2"></span>.
     873      </p>
    873874      <h3 id="rfc.section.3.2.2"><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;<a id="entity.length" href="#entity.length">Entity Length</a></h3>
    874875      <p id="rfc.section.3.2.2.p.1">The entity-length of a message is the length of the message-body before any transfer-codings have been applied. <a href="p1-messaging.html#message.length" title="Message Length">Section 4.4</a> of <a href="#Part1" id="rfc.xref.Part1.13"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> defines how the transfer-length of a message-body is determined.
    875876      </p>
     
    11851186            A user agent might suggest in such a case to add "en" to get the best matching behavior.
    11861187         </p>
    11871188      </div>
    1188       <div id="rfc.iref.c.2"></div>
     1189      <div id="rfc.iref.c.3"></div>
    11891190      <div id="rfc.iref.h.5"></div>
    11901191      <h2 id="rfc.section.5.5"><a href="#rfc.section.5.5">5.5</a>&nbsp;<a id="header.content-encoding" href="#header.content-encoding">Content-Encoding</a></h2>
    11911192      <p id="rfc.section.5.5.p.1">The entity-header field "Content-Encoding" is used as a modifier to the media-type. When present, its value indicates what
     
    12081209      </p>
    12091210      <p id="rfc.section.5.5.p.8">If multiple encodings have been applied to an entity, the content codings <em class="bcp14">MUST</em> be listed in the order in which they were applied. Additional information about the encoding parameters <em class="bcp14">MAY</em> be provided by other entity-header fields not defined by this specification.
    12101211      </p>
    1211       <div id="rfc.iref.c.3"></div>
     1212      <div id="rfc.iref.c.4"></div>
    12121213      <div id="rfc.iref.h.6"></div>
    12131214      <h2 id="rfc.section.5.6"><a href="#rfc.section.5.6">5.6</a>&nbsp;<a id="header.content-language" href="#header.content-language">Content-Language</a></h2>
    12141215      <p id="rfc.section.5.6.p.1">The entity-header field "Content-Language" describes the natural language(s) of the intended audience for the enclosed entity.
     
    12341235      </p>
    12351236      <p id="rfc.section.5.6.p.9">Content-Language <em class="bcp14">MAY</em> be applied to any media type -- it is not limited to textual documents.
    12361237      </p>
    1237       <div id="rfc.iref.c.4"></div>
     1238      <div id="rfc.iref.c.5"></div>
    12381239      <div id="rfc.iref.h.7"></div>
    12391240      <h2 id="rfc.section.5.7"><a href="#rfc.section.5.7">5.7</a>&nbsp;<a id="header.content-location" href="#header.content-location">Content-Location</a></h2>
    12401241      <p id="rfc.section.5.7.p.1">The entity-header field "Content-Location" <em class="bcp14">MAY</em> be used to supply the resource location for the entity enclosed in the message when that entity is accessible from a location
     
    12561257      </p>
    12571258      <p id="rfc.section.5.7.p.6">If the Content-Location is a relative URI, the relative URI is interpreted relative to the request-target.</p>
    12581259      <p id="rfc.section.5.7.p.7">The meaning of the Content-Location header in requests is undefined; servers are free to ignore it in those cases.</p>
    1259       <div id="rfc.iref.c.5"></div>
     1260      <div id="rfc.iref.c.6"></div>
    12601261      <div id="rfc.iref.h.8"></div>
    12611262      <h2 id="rfc.section.5.8"><a href="#rfc.section.5.8">5.8</a>&nbsp;<a id="header.content-md5" href="#header.content-md5">Content-MD5</a></h2>
    12621263      <p id="rfc.section.5.8.p.1">The entity-header field "Content-MD5", as defined in <a href="#RFC1864" id="rfc.xref.RFC1864.1"><cite title="The Content-MD5 Header Field">[RFC1864]</cite></a>, is an MD5 digest of the entity-body for the purpose of providing an end-to-end message integrity check (MIC) of the entity-body.
     
    12941295            with any of several line break conventions and not just the canonical form using CRLF.
    12951296         </p>
    12961297      </div>
    1297       <div id="rfc.iref.c.6"></div>
     1298      <div id="rfc.iref.c.7"></div>
    12981299      <div id="rfc.iref.h.9"></div>
    12991300      <h2 id="rfc.section.5.9"><a href="#rfc.section.5.9">5.9</a>&nbsp;<a id="header.content-type" href="#header.content-type">Content-Type</a></h2>
    13001301      <p id="rfc.section.5.9.p.1">The entity-header field "Content-Type" indicates the media type of the entity-body sent to the recipient or, in the case of
     
    16801681      <p id="rfc.section.B.p.2">A number of other headers, such as Content-Disposition and Title, from SMTP and MIME are also often implemented (see <a href="#RFC2076" id="rfc.xref.RFC2076.1"><cite title="Common Internet Message Headers">[RFC2076]</cite></a>).
    16811682      </p>
    16821683      <div id="rfc.iref.h.11"></div>
    1683       <div id="rfc.iref.c.7"></div>
     1684      <div id="rfc.iref.c.8"></div>
    16841685      <h2 id="rfc.section.B.1"><a href="#rfc.section.B.1">B.1</a>&nbsp;<a id="content-disposition" href="#content-disposition">Content-Disposition</a></h2>
    16851686      <p id="rfc.section.B.1.p.1">The Content-Disposition response-header field has been proposed as a means for the origin server to suggest a default filename
    16861687         if the user requests that the content is saved to a file. This usage is derived from the definition of Content-Disposition
     
    17181719      </p>
    17191720      <p id="rfc.section.C.1.p.4">A content-coding of "identity" was introduced, to solve problems discovered in caching. (<a href="#content.codings" title="Content Codings">Section&nbsp;2.2</a>)
    17201721      </p>
    1721       <p id="rfc.section.C.1.p.5">The Alternates<span id="rfc.iref.a.5"></span><span id="rfc.iref.h.12"></span>, Content-Version<span id="rfc.iref.c.8"></span><span id="rfc.iref.h.13"></span>, Derived-From<span id="rfc.iref.d.2"></span><span id="rfc.iref.h.14"></span>, Link<span id="rfc.iref.l.1"></span><span id="rfc.iref.h.15"></span>, URI<span id="rfc.iref.u.1"></span><span id="rfc.iref.h.16"></span>, Public<span id="rfc.iref.p.1"></span><span id="rfc.iref.h.17"></span> and Content-Base<span id="rfc.iref.c.9"></span><span id="rfc.iref.h.18"></span> header fields were defined in previous versions of this specification, but not commonly implemented. See <a href="http://tools.ietf.org/html/rfc2068#section-19.6.2">Section 19.6.2</a> of <a href="#RFC2068" id="rfc.xref.RFC2068.5"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>.
     1722      <p id="rfc.section.C.1.p.5">The Alternates<span id="rfc.iref.a.5"></span><span id="rfc.iref.h.12"></span>, Content-Version<span id="rfc.iref.c.9"></span><span id="rfc.iref.h.13"></span>, Derived-From<span id="rfc.iref.d.2"></span><span id="rfc.iref.h.14"></span>, Link<span id="rfc.iref.l.1"></span><span id="rfc.iref.h.15"></span>, URI<span id="rfc.iref.u.1"></span><span id="rfc.iref.h.16"></span>, Public<span id="rfc.iref.p.1"></span><span id="rfc.iref.h.17"></span> and Content-Base<span id="rfc.iref.c.10"></span><span id="rfc.iref.h.18"></span> header fields were defined in previous versions of this specification, but not commonly implemented. See <a href="http://tools.ietf.org/html/rfc2068#section-19.6.2">Section 19.6.2</a> of <a href="#RFC2068" id="rfc.xref.RFC2068.5"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>.
    17221723      </p>
    17231724      <h2 id="rfc.section.C.2"><a href="#rfc.section.C.2">C.2</a>&nbsp;<a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h2>
    17241725      <p id="rfc.section.C.2.p.1">Clarify contexts that charset is used in. (<a href="#character.sets" title="Character Sets">Section&nbsp;2.1</a>)
     
    19261927      <ul>
    19271928         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/80">http://tools.ietf.org/wg/httpbis/trac/ticket/80</a>&gt;: "Content-Location isn't special"
    19281929         </li>
     1930         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/155">http://tools.ietf.org/wg/httpbis/trac/ticket/155</a>&gt;: "Content Sniffing"
     1931         </li>
    19291932      </ul>
    19301933      <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1>
    19311934      <p class="noprint"><a href="#rfc.index.A">A</a> <a href="#rfc.index.B">B</a> <a href="#rfc.index.C">C</a> <a href="#rfc.index.D">D</a> <a href="#rfc.index.G">G</a> <a href="#rfc.index.H">H</a> <a href="#rfc.index.I">I</a> <a href="#rfc.index.L">L</a> <a href="#rfc.index.M">M</a> <a href="#rfc.index.P">P</a> <a href="#rfc.index.R">R</a> <a href="#rfc.index.U">U</a>
     
    19461949            </li>
    19471950            <li class="indline0"><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul class="ind">
    19481951                  <li class="indline1">compress&nbsp;&nbsp;<a class="iref" href="#rfc.iref.c.1">2.2</a></li>
    1949                   <li class="indline1">Content-Base header&nbsp;&nbsp;<a class="iref" href="#rfc.iref.c.9"><b>C.1</b></a></li>
    1950                   <li class="indline1">Content-Disposition header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.content-disposition.1">6.1</a>, <a class="iref" href="#rfc.xref.content-disposition.2">7.2</a>, <a class="iref" href="#rfc.iref.c.7"><b>B.1</b></a>, <a class="iref" href="#rfc.extref.c.32">B.1</a>, <a class="iref" href="#rfc.extref.c.50">D</a></li>
    1951                   <li class="indline1">Content-Encoding header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-encoding.1">2.2</a>, <a class="iref" href="#rfc.xref.header.content-encoding.2">3.1</a>, <a class="iref" href="#rfc.iref.c.2"><b>5.5</b></a>, <a class="iref" href="#rfc.xref.header.content-encoding.3">5.5</a>, <a class="iref" href="#rfc.xref.header.content-encoding.4">6.1</a></li>
    1952                   <li class="indline1">Content-Language header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-language.1">3.1</a>, <a class="iref" href="#rfc.iref.c.3"><b>5.6</b></a>, <a class="iref" href="#rfc.xref.header.content-language.2">6.1</a></li>
    1953                   <li class="indline1">Content-Location header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-location.1">3.1</a>, <a class="iref" href="#rfc.iref.c.4"><b>5.7</b></a>, <a class="iref" href="#rfc.xref.header.content-location.2">6.1</a></li>
    1954                   <li class="indline1">Content-MD5 header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-md5.1">3.1</a>, <a class="iref" href="#rfc.iref.c.5"><b>5.8</b></a>, <a class="iref" href="#rfc.xref.header.content-md5.2">6.1</a></li>
    1955                   <li class="indline1">Content-Type header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-type.1">2.3</a>, <a class="iref" href="#rfc.xref.header.content-type.2">3.1</a>, <a class="iref" href="#rfc.iref.c.6"><b>5.9</b></a>, <a class="iref" href="#rfc.xref.header.content-type.3">6.1</a></li>
    1956                   <li class="indline1">Content-Version header&nbsp;&nbsp;<a class="iref" href="#rfc.iref.c.8"><b>C.1</b></a></li>
     1952                  <li class="indline1">Content Type Sniffing&nbsp;&nbsp;<a class="iref" href="#rfc.iref.c.2">3.2.1</a></li>
     1953                  <li class="indline1">Content-Base header&nbsp;&nbsp;<a class="iref" href="#rfc.iref.c.10"><b>C.1</b></a></li>
     1954                  <li class="indline1">Content-Disposition header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.content-disposition.1">6.1</a>, <a class="iref" href="#rfc.xref.content-disposition.2">7.2</a>, <a class="iref" href="#rfc.iref.c.8"><b>B.1</b></a>, <a class="iref" href="#rfc.extref.c.32">B.1</a>, <a class="iref" href="#rfc.extref.c.50">D</a></li>
     1955                  <li class="indline1">Content-Encoding header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-encoding.1">2.2</a>, <a class="iref" href="#rfc.xref.header.content-encoding.2">3.1</a>, <a class="iref" href="#rfc.iref.c.3"><b>5.5</b></a>, <a class="iref" href="#rfc.xref.header.content-encoding.3">5.5</a>, <a class="iref" href="#rfc.xref.header.content-encoding.4">6.1</a></li>
     1956                  <li class="indline1">Content-Language header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-language.1">3.1</a>, <a class="iref" href="#rfc.iref.c.4"><b>5.6</b></a>, <a class="iref" href="#rfc.xref.header.content-language.2">6.1</a></li>
     1957                  <li class="indline1">Content-Location header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-location.1">3.1</a>, <a class="iref" href="#rfc.iref.c.5"><b>5.7</b></a>, <a class="iref" href="#rfc.xref.header.content-location.2">6.1</a></li>
     1958                  <li class="indline1">Content-MD5 header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-md5.1">3.1</a>, <a class="iref" href="#rfc.iref.c.6"><b>5.8</b></a>, <a class="iref" href="#rfc.xref.header.content-md5.2">6.1</a></li>
     1959                  <li class="indline1">Content-Type header&nbsp;&nbsp;<a class="iref" href="#rfc.xref.header.content-type.1">2.3</a>, <a class="iref" href="#rfc.xref.header.content-type.2">3.1</a>, <a class="iref" href="#rfc.iref.c.7"><b>5.9</b></a>, <a class="iref" href="#rfc.xref.header.content-type.3">6.1</a></li>
     1960                  <li class="indline1">Content-Version header&nbsp;&nbsp;<a class="iref" href="#rfc.iref.c.9"><b>C.1</b></a></li>
    19571961               </ul>
    19581962            </li>
    19591963            <li class="indline0"><a id="rfc.index.D" href="#rfc.index.D"><b>D</b></a><ul class="ind">