Ticket #155: 155.diff
File 155.diff, 18.2 KB (added by julian.reschke@…, 14 years ago) |
---|
-
p3-payload.xml
721 721 entity-body := Content-Encoding( Content-Type( data ) ) 722 722 </artwork></figure> 723 723 <t> 724 Content-Type specifies the media type of the underlying data. 724 Content-Type specifies the media type of the underlying data. Any 725 HTTP/1.1 message containing an entity-body &SHOULD; include a 726 Content-Type header field defining the media type of that body. If 727 the Content-Type header field is not present, it indicates that the 728 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> 725 733 Content-Encoding may be used to indicate any additional content 726 734 codings applied to the data, usually for the purpose of data 727 compression, that are a property of the requested resource. There is735 compression, that are a property of the requested resource. There is 728 736 no default encoding. 729 737 </t> 730 738 <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"/>. 738 743 </t> 739 744 </section> 740 745 … … 2959 2964 <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/80"/>: 2960 2965 "Content-Location isn't special" 2961 2966 </t> 2967 <t> 2968 <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/155"/>: 2969 "Content Sniffing" 2970 </t> 2962 2971 </list> 2963 2972 </t> 2964 2973 </section> -
p3-payload.html
477 477 </tr> 478 478 <tr> 479 479 <td class="header left"></td> 480 <td class="header right">June 1, 2009</td>480 <td class="header right">June 6, 2009</td> 481 481 </tr> 482 482 </table> 483 483 <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> … … 862 862 and Content-Encoding. These define a two-layer, ordered encoding model: 863 863 </p> 864 864 <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. If the Content-Type header field is not present, 866 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. 868 867 </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. 872 870 </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> 873 874 <h3 id="rfc.section.3.2.2"><a href="#rfc.section.3.2.2">3.2.2</a> <a id="entity.length" href="#entity.length">Entity Length</a></h3> 874 875 <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. 875 876 </p> … … 1185 1186 A user agent might suggest in such a case to add "en" to get the best matching behavior. 1186 1187 </p> 1187 1188 </div> 1188 <div id="rfc.iref.c. 2"></div>1189 <div id="rfc.iref.c.3"></div> 1189 1190 <div id="rfc.iref.h.5"></div> 1190 1191 <h2 id="rfc.section.5.5"><a href="#rfc.section.5.5">5.5</a> <a id="header.content-encoding" href="#header.content-encoding">Content-Encoding</a></h2> 1191 1192 <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 … … 1208 1209 </p> 1209 1210 <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. 1210 1211 </p> 1211 <div id="rfc.iref.c. 3"></div>1212 <div id="rfc.iref.c.4"></div> 1212 1213 <div id="rfc.iref.h.6"></div> 1213 1214 <h2 id="rfc.section.5.6"><a href="#rfc.section.5.6">5.6</a> <a id="header.content-language" href="#header.content-language">Content-Language</a></h2> 1214 1215 <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. … … 1234 1235 </p> 1235 1236 <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. 1236 1237 </p> 1237 <div id="rfc.iref.c. 4"></div>1238 <div id="rfc.iref.c.5"></div> 1238 1239 <div id="rfc.iref.h.7"></div> 1239 1240 <h2 id="rfc.section.5.7"><a href="#rfc.section.5.7">5.7</a> <a id="header.content-location" href="#header.content-location">Content-Location</a></h2> 1240 1241 <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 … … 1256 1257 </p> 1257 1258 <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> 1258 1259 <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> 1260 1261 <div id="rfc.iref.h.8"></div> 1261 1262 <h2 id="rfc.section.5.8"><a href="#rfc.section.5.8">5.8</a> <a id="header.content-md5" href="#header.content-md5">Content-MD5</a></h2> 1262 1263 <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. … … 1294 1295 with any of several line break conventions and not just the canonical form using CRLF. 1295 1296 </p> 1296 1297 </div> 1297 <div id="rfc.iref.c. 6"></div>1298 <div id="rfc.iref.c.7"></div> 1298 1299 <div id="rfc.iref.h.9"></div> 1299 1300 <h2 id="rfc.section.5.9"><a href="#rfc.section.5.9">5.9</a> <a id="header.content-type" href="#header.content-type">Content-Type</a></h2> 1300 1301 <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 … … 1680 1681 <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>). 1681 1682 </p> 1682 1683 <div id="rfc.iref.h.11"></div> 1683 <div id="rfc.iref.c. 7"></div>1684 <div id="rfc.iref.c.8"></div> 1684 1685 <h2 id="rfc.section.B.1"><a href="#rfc.section.B.1">B.1</a> <a id="content-disposition" href="#content-disposition">Content-Disposition</a></h2> 1685 1686 <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 1686 1687 if the user requests that the content is saved to a file. This usage is derived from the definition of Content-Disposition … … 1718 1719 </p> 1719 1720 <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 2.2</a>) 1720 1721 </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>. 1722 1723 </p> 1723 1724 <h2 id="rfc.section.C.2"><a href="#rfc.section.C.2">C.2</a> <a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h2> 1724 1725 <p id="rfc.section.C.2.p.1">Clarify contexts that charset is used in. (<a href="#character.sets" title="Character Sets">Section 2.1</a>) … … 1926 1927 <ul> 1927 1928 <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/80">http://tools.ietf.org/wg/httpbis/trac/ticket/80</a>>: "Content-Location isn't special" 1928 1929 </li> 1930 <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/155">http://tools.ietf.org/wg/httpbis/trac/ticket/155</a>>: "Content Sniffing" 1931 </li> 1929 1932 </ul> 1930 1933 <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1> 1931 1934 <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> … … 1946 1949 </li> 1947 1950 <li class="indline0"><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul class="ind"> 1948 1951 <li class="indline1">compress <a class="iref" href="#rfc.iref.c.1">2.2</a></li> 1949 <li class="indline1">Content-Base header <a class="iref" href="#rfc.iref.c.9"><b>C.1</b></a></li> 1950 <li class="indline1">Content-Disposition header <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 <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 <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 <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 <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 <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 <a class="iref" href="#rfc.iref.c.8"><b>C.1</b></a></li> 1952 <li class="indline1">Content Type Sniffing <a class="iref" href="#rfc.iref.c.2">3.2.1</a></li> 1953 <li class="indline1">Content-Base header <a class="iref" href="#rfc.iref.c.10"><b>C.1</b></a></li> 1954 <li class="indline1">Content-Disposition header <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 <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 <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 <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 <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 <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 <a class="iref" href="#rfc.iref.c.9"><b>C.1</b></a></li> 1957 1961 </ul> 1958 1962 </li> 1959 1963 <li class="indline0"><a id="rfc.index.D" href="#rfc.index.D"><b>D</b></a><ul class="ind">