Changeset 800 for draft-ietf-httpbis/latest
- Timestamp:
- 01/04/10 13:37:58 (12 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p4-conditional.html
r799 r800 536 536 </ul> 537 537 </li> 538 <li class="tocline0">2. <a href="#entity.tags">Entity Tags</a></li> 538 <li class="tocline0">2. <a href="#entity.tags">Entity Tags</a><ul class="toc"> 539 <li class="tocline1">2.1 <a href="#example.entity.tag.vs.conneg">Example: Entity Tags varying on Content-Negotiated Resources</a></li> 540 </ul> 541 </li> 539 542 <li class="tocline0">3. <a href="#rfc.section.3">Status Code Definitions</a><ul class="toc"> 540 543 <li class="tocline1">3.1 <a href="#status.304">304 Not Modified</a></li> … … 637 640 obtained by requests on different URIs does not imply the equivalence of those entities. 638 641 </p> 642 <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> <a id="example.entity.tag.vs.conneg" href="#example.entity.tag.vs.conneg">Example: Entity Tags varying on Content-Negotiated Resources</a></h2> 643 <p id="rfc.section.2.1.p.1">Consider a resource that is subject to content negotiation (<a href="p3-payload.html#content.negotiation" title="Content Negotiation">Section 4</a> of <a href="#Part3" id="rfc.xref.Part3.1"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>), and where the representations returned upon a GET request vary based on the Accept-Encoding request header field (<a href="p3-payload.html#header.accept-encoding" title="Accept-Encoding">Section 5.3</a> of <a href="#Part3" id="rfc.xref.Part3.2"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>): 644 </p> 645 <div id="rfc.figure.u.4"></div> 646 <p>>> Request:</p><pre class="text2">GET /index HTTP/1.1 647 Host: www.example.com 648 Accept-Encoding: gzip 649 650 </pre><p id="rfc.section.2.1.p.3">In this case, the response may use the gzip Content Coding or not. If it does, it might look like that:</p> 651 <div id="rfc.figure.u.5"></div> 652 <p>>> Response:</p><pre class="text">HTTP/1.1 200 OK 653 Date: Thu, 26 Mar 2010 00:05:00 GMT 654 ETag: "123-a" 655 Content-Length: 70 656 Vary: Accept-Encoding 657 Content-Type: text/plain 658 659 <span id="exbody">Hello World! 660 Hello World! 661 Hello World! 662 Hello World! 663 Hello World! 664 </span></pre><p id="rfc.section.2.1.p.5">A variant that does use gzip Content Coding would be:</p> 665 <div id="rfc.figure.u.6"></div> 666 <p>>> Response:</p><pre class="text">HTTP/1.1 200 OK 667 Date: Thu, 26 Mar 2010 00:05:00 GMT 668 ETag: "123-b" 669 Content-Length: 43 670 Vary: Accept-Encoding 671 Content-Type: text/plain 672 Content-Encoding: gzip 673 674 <em>...binary data...</em></pre><div class="note" id="rfc.section.2.1.p.7"> 675 <p> <b>Note:</b> Content Codings are a property of the response entity, thus affect the Entity Tag. An alternative are Transfer Codings (<a href="p1-messaging.html#transfer.codings" title="Transfer Codings">Section 6.2</a> of <a href="#Part1" id="rfc.xref.Part1.6"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) which apply only to the transfer of the message, and thus do not require assigning distinct entity tags. 676 </p> 677 </div> 639 678 <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a> Status Code Definitions 640 679 </h1> … … 648 687 <ul> 649 688 <li> 650 <p>Date, unless its omission is required by <a href="p1-messaging.html#clockless.origin.server.operation" title="Clockless Origin Server Operation">Section 9.3.1</a> of <a href="#Part1" id="rfc.xref.Part1. 6"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>.689 <p>Date, unless its omission is required by <a href="p1-messaging.html#clockless.origin.server.operation" title="Clockless Origin Server Operation">Section 9.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.7"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. 651 690 </p> 652 691 <p>If a clockless origin server obeys these rules, and proxies and clients add their own Date to any response received without 653 one (as already specified by <a href="p1-messaging.html#header.date" title="Date">Section 9.3</a> of <a href="#Part1" id="rfc.xref.Part1. 7"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, caches will operate correctly.692 one (as already specified by <a href="p1-messaging.html#header.date" title="Date">Section 9.3</a> of <a href="#Part1" id="rfc.xref.Part1.8"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, caches will operate correctly. 654 693 </p> 655 694 </li> … … 868 907 <p id="rfc.section.6.1.p.1">The "ETag" response-header field provides the current value of the entity tag (see <a href="#entity.tags" title="Entity Tags">Section 2</a>) for the requested variant, which may be used for comparison with other entities from the same resource (see <a href="#weak.and.strong.validators" title="Weak and Strong Validators">Section 4</a>). 869 908 </p> 870 <div id="rfc.figure.u. 4"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span> <a href="#header.etag" class="smpl">ETag</a> = "ETag" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.etag" class="smpl">ETag-v</a>909 <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span> <a href="#header.etag" class="smpl">ETag</a> = "ETag" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.etag" class="smpl">ETag-v</a> 871 910 <a href="#header.etag" class="smpl">ETag-v</a> = <a href="#entity.tags" class="smpl">entity-tag</a> 872 </pre><div id="rfc.figure.u. 5"></div>911 </pre><div id="rfc.figure.u.8"></div> 873 912 <p>Examples:</p> <pre class="text"> ETag: "xyzzy" 874 913 ETag: W/"xyzzy" … … 895 934 any current entity of the resource. 896 935 </p> 897 <div id="rfc.figure.u. 6"></div><pre class="inline"><span id="rfc.iref.g.6"></span><span id="rfc.iref.g.7"></span> <a href="#header.if-match" class="smpl">If-Match</a> = "If-Match" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.if-match" class="smpl">If-Match-v</a>936 <div id="rfc.figure.u.9"></div><pre class="inline"><span id="rfc.iref.g.6"></span><span id="rfc.iref.g.7"></span> <a href="#header.if-match" class="smpl">If-Match</a> = "If-Match" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.if-match" class="smpl">If-Match-v</a> 898 937 <a href="#header.if-match" class="smpl">If-Match-v</a> = "*" / 1#<a href="#entity.tags" class="smpl">entity-tag</a> 899 938 </pre><p id="rfc.section.6.2.p.4">If any of the entity tags match the entity tag of the entity that would have been returned in the response to a similar GET … … 913 952 their knowledge. Examples: 914 953 </p> 915 <div id="rfc.figure.u. 7"></div><pre class="text"> If-Match: "xyzzy"954 <div id="rfc.figure.u.10"></div><pre class="text"> If-Match: "xyzzy" 916 955 If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" 917 956 If-Match: * … … 926 965 response will be returned. 927 966 </p> 928 <div id="rfc.figure.u. 8"></div><pre class="inline"><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span> <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = "If-Modified-Since" ":" <a href="#core.rules" class="smpl">OWS</a>967 <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span> <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = "If-Modified-Since" ":" <a href="#core.rules" class="smpl">OWS</a> 929 968 <a href="#header.if-modified-since" class="smpl">If-Modified-Since-v</a> 930 969 <a href="#header.if-modified-since" class="smpl">If-Modified-Since-v</a> = <a href="#abnf.dependencies" class="smpl">HTTP-date</a> 931 970 </pre><p id="rfc.section.6.3.p.3">An example of the field is:</p> 932 <div id="rfc.figure.u. 9"></div><pre class="text"> If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT971 <div id="rfc.figure.u.12"></div><pre class="text"> If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT 933 972 </pre><p id="rfc.section.6.3.p.5">A GET method with an If-Modified-Since header and no Range header requests that the identified entity be transferred only 934 973 if it has been modified since the date given by the If-Modified-Since header. The algorithm for determining this includes … … 978 1017 </p> 979 1018 <p id="rfc.section.6.4.p.3">As a special case, the value "*" matches any current entity of the resource.</p> 980 <div id="rfc.figure.u.1 0"></div><pre class="inline"><span id="rfc.iref.g.10"></span><span id="rfc.iref.g.11"></span> <a href="#header.if-none-match" class="smpl">If-None-Match</a> = "If-None-Match" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.if-none-match" class="smpl">If-None-Match-v</a>1019 <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.10"></span><span id="rfc.iref.g.11"></span> <a href="#header.if-none-match" class="smpl">If-None-Match</a> = "If-None-Match" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.if-none-match" class="smpl">If-None-Match-v</a> 981 1020 <a href="#header.if-none-match" class="smpl">If-None-Match-v</a> = "*" / 1#<a href="#entity.tags" class="smpl">entity-tag</a> 982 1021 </pre><p id="rfc.section.6.4.p.5">If any of the entity tags match the entity tag of the entity that would have been returned in the response to a similar GET … … 994 1033 </p> 995 1034 <p id="rfc.section.6.4.p.9">Examples:</p> 996 <div id="rfc.figure.u.1 1"></div><pre class="text"> If-None-Match: "xyzzy"1035 <div id="rfc.figure.u.14"></div><pre class="text"> If-None-Match: "xyzzy" 997 1036 If-None-Match: W/"xyzzy" 998 1037 If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" … … 1010 1049 <p id="rfc.section.6.5.p.2">If the requested variant has been modified since the specified time, the server <em class="bcp14">MUST NOT</em> perform the requested operation, and <em class="bcp14">MUST</em> return a 412 (Precondition Failed). 1011 1050 </p> 1012 <div id="rfc.figure.u.1 2"></div><pre class="inline"><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span> <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = "If-Unmodified-Since" ":" <a href="#core.rules" class="smpl">OWS</a>1051 <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span> <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = "If-Unmodified-Since" ":" <a href="#core.rules" class="smpl">OWS</a> 1013 1052 <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since-v</a> 1014 1053 <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since-v</a> = <a href="#abnf.dependencies" class="smpl">HTTP-date</a> 1015 1054 </pre><p id="rfc.section.6.5.p.4">An example of the field is:</p> 1016 <div id="rfc.figure.u.1 3"></div><pre class="text"> If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT1055 <div id="rfc.figure.u.16"></div><pre class="text"> If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT 1017 1056 </pre><p id="rfc.section.6.5.p.6">If the request normally (i.e., without the If-Unmodified-Since header) would result in anything other than a 2xx or 412 status, 1018 1057 the If-Unmodified-Since header <em class="bcp14">SHOULD</em> be ignored. … … 1028 1067 modified. 1029 1068 </p> 1030 <div id="rfc.figure.u.1 4"></div><pre class="inline"><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span> <a href="#header.last-modified" class="smpl">Last-Modified</a> = "Last-Modified" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.last-modified" class="smpl">Last-Modified-v</a>1069 <div id="rfc.figure.u.17"></div><pre class="inline"><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span> <a href="#header.last-modified" class="smpl">Last-Modified</a> = "Last-Modified" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.last-modified" class="smpl">Last-Modified-v</a> 1031 1070 <a href="#header.last-modified" class="smpl">Last-Modified-v</a> = <a href="#abnf.dependencies" class="smpl">HTTP-date</a> 1032 1071 </pre><p id="rfc.section.6.6.p.3">An example of its use is</p> 1033 <div id="rfc.figure.u.1 5"></div><pre class="text"> Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT1072 <div id="rfc.figure.u.18"></div><pre class="text"> Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT 1034 1073 </pre><p id="rfc.section.6.6.p.5">The exact meaning of this header field depends on the implementation of the origin server and the nature of the original resource. 1035 1074 For files, it may be just the file system last-modified time. For entities with dynamically included parts, it may be the … … 1141 1180 <p id="rfc.section.7.2.p.2">The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".</p> 1142 1181 <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a> <a id="security.considerations" href="#security.considerations">Security Considerations</a></h1> 1143 <p id="rfc.section.8.p.1">No additional security considerations have been identified beyond those applicable to HTTP in general <a href="#Part1" id="rfc.xref.Part1. 8"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>.1182 <p id="rfc.section.8.p.1">No additional security considerations have been identified beyond those applicable to HTTP in general <a href="#Part1" id="rfc.xref.Part1.9"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. 1144 1183 </p> 1145 1184 <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a> <a id="ack" href="#ack">Acknowledgments</a></h1> … … 1148 1187 <h2 id="rfc.references.1"><a href="#rfc.section.10.1" id="rfc.section.10.1">10.1</a> Normative References 1149 1188 </h2> 1150 <table> 1189 <table> 1151 1190 <tr> 1152 1191 <td class="reference"><b id="Part1">[Part1]</b></td> 1153 1192 <td class="top"><a href="mailto:fielding@gbiv.com" title="Day Software">Fielding, R., Ed.</a>, <a href="mailto:jg@laptop.org" title="One Laptop per Child">Gettys, J.</a>, <a href="mailto:JeffMogul@acm.org" title="Hewlett-Packard Company">Mogul, J.</a>, <a href="mailto:henrikn@microsoft.com" title="Microsoft Corporation">Frystyk, H.</a>, <a href="mailto:LMM@acm.org" title="Adobe Systems, Incorporated">Masinter, L.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, <a href="mailto:timbl@w3.org" title="World Wide Web Consortium">Berners-Lee, T.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. F. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-latest">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</a>”, Internet-Draft draft-ietf-httpbis-p1-messaging-latest (work in progress), April 2010. 1193 </td> 1194 </tr> 1195 <tr> 1196 <td class="reference"><b id="Part3">[Part3]</b></td> 1197 <td class="top"><a href="mailto:fielding@gbiv.com" title="Day Software">Fielding, R., Ed.</a>, <a href="mailto:jg@laptop.org" title="One Laptop per Child">Gettys, J.</a>, <a href="mailto:JeffMogul@acm.org" title="Hewlett-Packard Company">Mogul, J.</a>, <a href="mailto:henrikn@microsoft.com" title="Microsoft Corporation">Frystyk, H.</a>, <a href="mailto:LMM@acm.org" title="Adobe Systems, Incorporated">Masinter, L.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, <a href="mailto:timbl@w3.org" title="World Wide Web Consortium">Berners-Lee, T.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. F. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p3-payload-latest">HTTP/1.1, part 3: Message Payload and Content Negotiation</a>”, Internet-Draft draft-ietf-httpbis-p3-payload-latest (work in progress), April 2010. 1154 1198 </td> 1155 1199 </tr> … … 1212 1256 </p> 1213 1257 <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a> <a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1> 1214 <div id="rfc.figure.u.1 6"></div> <pre class="inline"><a href="#header.etag" class="smpl">ETag</a> = "ETag:" OWS ETag-v1258 <div id="rfc.figure.u.19"></div> <pre class="inline"><a href="#header.etag" class="smpl">ETag</a> = "ETag:" OWS ETag-v 1215 1259 <a href="#header.etag" class="smpl">ETag-v</a> = entity-tag 1216 1260 … … 1241 1285 1242 1286 <a href="#entity.tags" class="smpl">weak</a> = %x57.2F ; W/ 1243 </pre> <div id="rfc.figure.u. 17"></div>1287 </pre> <div id="rfc.figure.u.20"></div> 1244 1288 <p>ABNF diagnostics:</p><pre class="inline">; ETag defined but not used 1245 1289 ; If-Match defined but not used … … 1388 1432 </li> 1389 1433 <li class="indline0"><a id="rfc.index.P" href="#rfc.index.P"><b>P</b></a><ul class="ind"> 1390 <li class="indline1"><em>Part1</em> <a class="iref" href="#rfc.xref.Part1.1">1.2</a>, <a class="iref" href="#rfc.xref.Part1.2">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.3">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.4">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.5">1.2.2</a>, <a class="iref" href="#rfc.xref.Part1.6"> 3.1</a>, <a class="iref" href="#rfc.xref.Part1.7">3.1</a>, <a class="iref" href="#rfc.xref.Part1.8">8</a>, <a class="iref" href="#Part1"><b>10.1</b></a><ul class="ind">1434 <li class="indline1"><em>Part1</em> <a class="iref" href="#rfc.xref.Part1.1">1.2</a>, <a class="iref" href="#rfc.xref.Part1.2">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.3">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.4">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.5">1.2.2</a>, <a class="iref" href="#rfc.xref.Part1.6">2.1</a>, <a class="iref" href="#rfc.xref.Part1.7">3.1</a>, <a class="iref" href="#rfc.xref.Part1.8">3.1</a>, <a class="iref" href="#rfc.xref.Part1.9">8</a>, <a class="iref" href="#Part1"><b>10.1</b></a><ul class="ind"> 1391 1435 <li class="indline1"><em>Section 1.2</em> <a class="iref" href="#rfc.xref.Part1.1">1.2</a></li> 1392 1436 <li class="indline1"><em>Section 1.2.2</em> <a class="iref" href="#rfc.xref.Part1.2">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.3">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.4">1.2.1</a></li> 1393 1437 <li class="indline1"><em>Section 6.1</em> <a class="iref" href="#rfc.xref.Part1.5">1.2.2</a></li> 1394 <li class="indline1"><em>Section 9.3.1</em> <a class="iref" href="#rfc.xref.Part1.6">3.1</a></li> 1395 <li class="indline1"><em>Section 9.3</em> <a class="iref" href="#rfc.xref.Part1.7">3.1</a></li> 1438 <li class="indline1"><em>Section 6.2</em> <a class="iref" href="#rfc.xref.Part1.6">2.1</a></li> 1439 <li class="indline1"><em>Section 9.3.1</em> <a class="iref" href="#rfc.xref.Part1.7">3.1</a></li> 1440 <li class="indline1"><em>Section 9.3</em> <a class="iref" href="#rfc.xref.Part1.8">3.1</a></li> 1441 </ul> 1442 </li> 1443 <li class="indline1"><em>Part3</em> <a class="iref" href="#rfc.xref.Part3.1">2.1</a>, <a class="iref" href="#rfc.xref.Part3.2">2.1</a>, <a class="iref" href="#Part3"><b>10.1</b></a><ul class="ind"> 1444 <li class="indline1"><em>Section 4</em> <a class="iref" href="#rfc.xref.Part3.1">2.1</a></li> 1445 <li class="indline1"><em>Section 5.3</em> <a class="iref" href="#rfc.xref.Part3.2">2.1</a></li> 1396 1446 </ul> 1397 1447 </li> -
draft-ietf-httpbis/latest/p4-conditional.xml
r799 r800 21 21 <!ENTITY messaging "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 22 22 <!ENTITY caching "<xref target='Part6' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 23 <!ENTITY header-accept-encoding "<xref target='Part3' x:rel='#header.accept-encoding' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 23 24 <!ENTITY header-if-range "<xref target='Part5' x:rel='#header.if-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 24 25 <!ENTITY header-range "<xref target='Part5' x:rel='#header.range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> … … 26 27 <!ENTITY clockless "<xref target='Part1' x:rel='#clockless.origin.server.operation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 27 28 <!ENTITY full-date "<xref target='Part1' x:rel='#date.time.formats.full.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 29 <!ENTITY transfer-codings "<xref target='Part1' x:rel='#transfer.codings' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 30 <!ENTITY content-negotiation "<xref target='Part3' x:rel='#content.negotiation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 28 31 ]> 29 32 <?rfc toc="yes" ?> … … 340 343 entities. 341 344 </t> 345 346 <section title="Example: Entity Tags varying on Content-Negotiated Resources" anchor="example.entity.tag.vs.conneg"> 347 <t> 348 Consider a resource that is subject to content negotiation (&content-negotiation;), 349 and where the representations returned upon a GET request vary based on 350 the Accept-Encoding request header field (&header-accept-encoding;): 351 </t> 352 <figure><preamble>>> Request:</preamble><artwork type="message/http; msgtype="request"" x:indent-with=" "> 353 GET /index HTTP/1.1 354 Host: www.example.com 355 Accept-Encoding: gzip 356 357 </artwork></figure> 358 <t> 359 In this case, the response may use the gzip Content Coding or not. 360 If it does, it might look like that: 361 </t> 362 <figure><preamble>>> Response:</preamble><artwork type="message/http; msgtype="response"" x:indent-with=" "> 363 HTTP/1.1 200 OK 364 Date: Thu, 26 Mar 2010 00:05:00 GMT 365 ETag: "123-a" 366 Content-Length: <x:length-of target="exbody"/> 367 Vary: Accept-Encoding 368 Content-Type: text/plain 369 370 <x:span anchor="exbody">Hello World! 371 Hello World! 372 Hello World! 373 Hello World! 374 Hello World! 375 </x:span></artwork></figure> 376 <t> 377 A variant that does use gzip Content Coding would be: 378 </t> 379 <figure><preamble>>> Response:</preamble><artwork type="message/http; msgtype="response"" x:indent-with=" "> 380 HTTP/1.1 200 OK 381 Date: Thu, 26 Mar 2010 00:05:00 GMT 382 ETag: "123-b" 383 Content-Length: 43 384 Vary: Accept-Encoding 385 Content-Type: text/plain 386 Content-Encoding: gzip 387 388 <spanx>...binary data...</spanx></artwork></figure> 389 <x:note> 390 <t> 391 <x:h>Note:</x:h> Content Codings are a property of the response 392 entity, thus affect the Entity Tag. An alternative are Transfer 393 Codings (&transfer-codings;) which apply only to the transfer of 394 the message, and thus do not require assigning distinct entity tags. 395 </t> 396 </x:note> 397 </section> 342 398 </section> 343 399 … … 1200 1256 </reference> 1201 1257 1258 <reference anchor="Part3"> 1259 <front> 1260 <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title> 1261 <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> 1262 <organization abbrev="Day Software">Day Software</organization> 1263 <address><email>fielding@gbiv.com</email></address> 1264 </author> 1265 <author initials="J." surname="Gettys" fullname="Jim Gettys"> 1266 <organization>One Laptop per Child</organization> 1267 <address><email>jg@laptop.org</email></address> 1268 </author> 1269 <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> 1270 <organization abbrev="HP">Hewlett-Packard Company</organization> 1271 <address><email>JeffMogul@acm.org</email></address> 1272 </author> 1273 <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> 1274 <organization abbrev="Microsoft">Microsoft Corporation</organization> 1275 <address><email>henrikn@microsoft.com</email></address> 1276 </author> 1277 <author initials="L." surname="Masinter" fullname="Larry Masinter"> 1278 <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> 1279 <address><email>LMM@acm.org</email></address> 1280 </author> 1281 <author initials="P." surname="Leach" fullname="Paul J. Leach"> 1282 <organization abbrev="Microsoft">Microsoft Corporation</organization> 1283 <address><email>paulle@microsoft.com</email></address> 1284 </author> 1285 <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> 1286 <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> 1287 <address><email>timbl@w3.org</email></address> 1288 </author> 1289 <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> 1290 <organization abbrev="W3C">World Wide Web Consortium</organization> 1291 <address><email>ylafon@w3.org</email></address> 1292 </author> 1293 <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> 1294 <organization abbrev="greenbytes">greenbytes GmbH</organization> 1295 <address><email>julian.reschke@greenbytes.de</email></address> 1296 </author> 1297 <date month="&ID-MONTH;" year="&ID-YEAR;"/> 1298 </front> 1299 <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/> 1300 <x:source href="p3-payload.xml" basename="p3-payload"/> 1301 </reference> 1302 1202 1303 <reference anchor="Part5"> 1203 1304 <front>
Note: See TracChangeset
for help on using the changeset viewer.