* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Ticket #39: i39.diff

File i39.diff, 6.3 KB (added by julian.reschke@gmx.de, 4 years ago)

Proposed example

  • p4-conditional.xml

     
    2020  <!ENTITY header-date                "<xref target='Part1' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2121  <!ENTITY messaging                  "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2222  <!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'/>"> 
    2324  <!ENTITY header-if-range            "<xref target='Part5' x:rel='#header.if-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2425  <!ENTITY header-range               "<xref target='Part5' x:rel='#header.range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2526  <!ENTITY header-vary                "<xref target='Part6' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2627  <!ENTITY clockless                  "<xref target='Part1' x:rel='#clockless.origin.server.operation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2728  <!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'/>"> 
    2831]> 
    2932<?rfc toc="yes" ?> 
    3033<?rfc symrefs="yes" ?> 
     
    338341   requests on different URIs does not imply the equivalence of those 
    339342   entities. 
    340343</t> 
     344 
     345<section title="Example: Entity Tags varying on Content-Negotiated Resources" anchor="example.entity.tag.vs.conneg"> 
     346<t> 
     347   Consider a resource that is subject to content negotiation (&content-negotiation;), 
     348   and where the representations returned upon a GET request vary based on 
     349   the Accept-Encoding request header field (&header-accept-encoding;): 
     350</t> 
     351<figure><preamble>>> Request:</preamble><artwork type="message/http; msgtype=&#34;request&#34;"  x:indent-with="  "> 
     352GET /index HTTP/1.1 
     353Host: www.example.com 
     354Accept-Encoding: gzip 
     355 
     356</artwork></figure> 
     357<t> 
     358   In this case, the response may use the gzip Content Coding or not. 
     359   If it does, it might look like that: 
     360</t> 
     361<figure><preamble>>> Response:</preamble><artwork type="message/http; msgtype=&#34;response&#34;"  x:indent-with="  "> 
     362HTTP/1.1 200 OK 
     363Date: Thu, 26 Mar 2010 00:05:00 GMT 
     364ETag: "123-a" 
     365Content-Length: <x:length-of target="exbody"/> 
     366Vary: Accept-Encoding 
     367Content-Type: text/plain 
     368 
     369<x:span anchor="exbody">Hello World! 
     370Hello World! 
     371Hello World! 
     372Hello World! 
     373Hello World! 
     374</x:span></artwork></figure> 
     375<t> 
     376   A variant that does use gzip Content Coding would be: 
     377</t> 
     378<figure><preamble>>> Response:</preamble><artwork type="message/http; msgtype=&#34;response&#34;"  x:indent-with="  "> 
     379HTTP/1.1 200 OK 
     380Date: Thu, 26 Mar 2010 00:05:00 GMT 
     381ETag: "123-b" 
     382Content-Length: 43 
     383Vary: Accept-Encoding 
     384Content-Type: text/plain 
     385Content-Encoding: gzip 
     386 
     387<spanx>...binary data...</spanx></artwork></figure> 
     388<x:note> 
     389  <t> 
     390    <x:h>Note:</x:h> Content Codings are a property of the response 
     391    entity, thus affect the Entity Tag. An alternative are Transfer 
     392    Codings (&transfer-codings;) which apply only the transfer of 
     393    the message, and thus do not require assigning distinct entity tags. 
     394  </t> 
     395</x:note> 
    341396</section> 
     397</section> 
    342398 
    343399<section title="Status Code Definitions"> 
    344400<section title="304 Not Modified" anchor="status.304"> 
     
    11981254  <x:source href="p1-messaging.xml" basename="p1-messaging"/> 
    11991255</reference> 
    12001256 
     1257<reference anchor="Part3"> 
     1258  <front> 
     1259    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title> 
     1260    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> 
     1261      <organization abbrev="Day Software">Day Software</organization> 
     1262      <address><email>fielding@gbiv.com</email></address> 
     1263    </author> 
     1264    <author initials="J." surname="Gettys" fullname="Jim Gettys"> 
     1265      <organization>One Laptop per Child</organization> 
     1266      <address><email>jg@laptop.org</email></address> 
     1267    </author> 
     1268    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> 
     1269      <organization abbrev="HP">Hewlett-Packard Company</organization> 
     1270      <address><email>JeffMogul@acm.org</email></address> 
     1271    </author> 
     1272    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> 
     1273      <organization abbrev="Microsoft">Microsoft Corporation</organization> 
     1274      <address><email>henrikn@microsoft.com</email></address> 
     1275    </author> 
     1276    <author initials="L." surname="Masinter" fullname="Larry Masinter"> 
     1277      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> 
     1278      <address><email>LMM@acm.org</email></address> 
     1279    </author> 
     1280    <author initials="P." surname="Leach" fullname="Paul J. Leach"> 
     1281      <organization abbrev="Microsoft">Microsoft Corporation</organization> 
     1282      <address><email>paulle@microsoft.com</email></address> 
     1283    </author> 
     1284    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> 
     1285      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> 
     1286      <address><email>timbl@w3.org</email></address> 
     1287    </author> 
     1288    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> 
     1289      <organization abbrev="W3C">World Wide Web Consortium</organization> 
     1290      <address><email>ylafon@w3.org</email></address> 
     1291    </author> 
     1292    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> 
     1293      <organization abbrev="greenbytes">greenbytes GmbH</organization> 
     1294      <address><email>julian.reschke@greenbytes.de</email></address> 
     1295    </author> 
     1296    <date month="&ID-MONTH;" year="&ID-YEAR;"/> 
     1297  </front> 
     1298  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/> 
     1299  <x:source href="p3-payload.xml" basename="p3-payload"/> 
     1300</reference> 
     1301 
    12011302<reference anchor="Part5"> 
    12021303  <front> 
    12031304    <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>