Changeset 1260 for draft-ietf-httpbis/latest/p4-conditional.html
- Timestamp:
- 05/04/11 22:49:27 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p4-conditional.html
r1258 r1260 359 359 } 360 360 @bottom-center { 361 content: "Expires October 6, 2011";361 content: "Expires October 7, 2011"; 362 362 } 363 363 @bottom-right { … … 404 404 <meta name="dct.creator" content="Reschke, J. F."> 405 405 <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p4-conditional-latest"> 406 <meta name="dct.issued" scheme="ISO8601" content="2011-04-0 4">406 <meta name="dct.issued" scheme="ISO8601" content="2011-04-05"> 407 407 <meta name="dct.replaces" content="urn:ietf:rfc:2616"> 408 408 <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 4 of the seven-part specification that defines the protocol referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616. Part 4 defines request header fields for indicating conditional requests and the rules for constructing responses to those requests."> … … 430 430 </tr> 431 431 <tr> 432 <td class="left">Expires: October 6, 2011</td>432 <td class="left">Expires: October 7, 2011</td> 433 433 <td class="right">J. Mogul</td> 434 434 </tr> … … 487 487 <tr> 488 488 <td class="left"></td> 489 <td class="right">April 4, 2011</td>489 <td class="right">April 5, 2011</td> 490 490 </tr> 491 491 </tbody> … … 513 513 in progress”. 514 514 </p> 515 <p>This Internet-Draft will expire on October 6, 2011.</p>515 <p>This Internet-Draft will expire on October 7, 2011.</p> 516 516 <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1> 517 517 <p>Copyright © 2011 IETF Trust and the persons identified as the document authors. All rights reserved.</p> … … 537 537 </li> 538 538 <li>2. <a href="#resource.metadata">Resource State Metadata (Validators)</a><ul> 539 <li>2.1 <a href="#header.last-modified">Last-Modified</a></li> 540 <li>2.2 <a href="#entity.tags">Entity Tags</a><ul> 541 <li>2.2.1 <a href="#header.etag">ETag</a></li> 542 <li>2.2.2 <a href="#example.entity.tag.vs.conneg">Example: Entity-tags varying on Content-Negotiated Resources</a></li> 539 <li>2.1 <a href="#header.last-modified">Last-Modified</a><ul> 540 <li>2.1.1 <a href="#lastmod.generation">Generation</a></li> 541 <li>2.1.2 <a href="#lastmod.comparison">Comparison</a></li> 543 542 </ul> 544 543 </li> 545 <li>2.3 <a href="#weak.and.strong.validators">Weak and Strong Validators</a></li> 546 <li>2.4 <a href="#rules.for.when.to.use.entity.tags.and.last-modified.dates">Rules for When to Use Entity-tags and Last-Modified Dates</a></li> 544 <li>2.2 <a href="#header.etag">ETag</a><ul> 545 <li>2.2.1 <a href="#entity.tag.generation">Generation</a></li> 546 <li>2.2.2 <a href="#weak.and.strong.validators">Weak versus Strong</a></li> 547 <li>2.2.3 <a href="#entity.tag.comparison">Comparison</a></li> 548 <li>2.2.4 <a href="#rules.for.when.to.use.entity.tags.and.last-modified.dates">Rules for When to Use Entity-tags and Last-Modified Dates</a></li> 549 <li>2.2.5 <a href="#example.entity.tag.vs.conneg">Example: Entity-tags varying on Content-Negotiated Resources</a></li> 550 </ul> 551 </li> 547 552 </ul> 548 553 </li> … … 552 557 <li>3.3 <a href="#header.if-modified-since">If-Modified-Since</a></li> 553 558 <li>3.4 <a href="#header.if-unmodified-since">If-Unmodified-Since</a></li> 559 <li>3.5 <a href="#header.if-range">If-Range</a></li> 554 560 </ul> 555 561 </li> … … 597 603 <p id="rfc.section.1.p.1">This document defines the HTTP/1.1 conditional request mechanisms, including both response metadata that can be used to indicate 598 604 or observe changes to resource state and request header fields that specify preconditions to be checked before performing 599 the action given by the request method. Conditional GET requests are the most efficient mechanism for HTTP cache updates <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>. Conditionals can be applied to state-changing methods, such as PUT and DELETE, to prevent the "lost update" problem: one600 client accidentally overwriting the work of another client that has been acting in parallel.605 the action given by the request method. Conditional GET requests are the most efficient mechanism for HTTP cache updates <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>. Conditionals can also be applied to state-changing methods, such as PUT and DELETE, to prevent the "lost update" problem: 606 one client accidentally overwriting the work of another client that has been acting in parallel. 601 607 </p> 602 608 <p id="rfc.section.1.p.2">Conditional request preconditions are based on the state of the target resource as a whole (its current value set) or the … … 637 643 <p id="rfc.section.2.p.1">This specification defines two forms of metadata that are commonly used to observe resource state and test for preconditions: 638 644 modification dates and opaque entity tags. Additional metadata that reflects resource state has been defined by various extensions 639 of HTTP, such as WebDAV <a href="#RFC4918" id="rfc.xref.RFC4918.1"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a>, that are beyond the scope of this specification. Such metadatais referred to as a "<dfn>validator</dfn>" when it is used within a precondition.645 of HTTP, such as WebDAV <a href="#RFC4918" id="rfc.xref.RFC4918.1"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a>, that are beyond the scope of this specification. A resource metadata value is referred to as a "<dfn>validator</dfn>" when it is used within a precondition. 640 646 </p> 641 647 <div id="rfc.iref.l.1"></div> 642 648 <div id="rfc.iref.h.1"></div> 643 649 <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> <a id="header.last-modified" href="#header.last-modified">Last-Modified</a></h2> 644 <p id="rfc.section.2.1.p.1">The "Last-Modified" header field indicates the date and time at which the origin server believes the representation was last645 modified.650 <p id="rfc.section.2.1.p.1">The "Last-Modified" header field indicates the date and time at which the origin server believes the selected representation 651 was last modified. 646 652 </p> 647 653 <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.1"></span> <a href="#header.last-modified" class="smpl">Last-Modified</a> = <a href="#notation" class="smpl">HTTP-date</a> 648 654 </pre><p id="rfc.section.2.1.p.3">An example of its use is</p> 649 655 <div id="rfc.figure.u.3"></div><pre class="text"> Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT 650 </pre><p id="rfc.section.2.1.p.5">A representation is typically the sum of many parts behind the resource interface. The last-modified time would usually be 656 </pre><h3 id="rfc.section.2.1.1"><a href="#rfc.section.2.1.1">2.1.1</a> <a id="lastmod.generation" href="#lastmod.generation">Generation</a></h3> 657 <p id="rfc.section.2.1.1.p.1">Origin servers <em class="bcp14">SHOULD</em> send Last-Modified for any selected representation for which a last modification date can be reasonably and consistently determined, 658 since its use in conditional requests and evaluating cache freshness (<a href="#Part6" id="rfc.xref.Part6.2"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) results in a substantial reduction of HTTP traffic on the Internet and can be a significant factor in improving service 659 scalability and reliability. 660 </p> 661 <p id="rfc.section.2.1.1.p.2">A representation is typically the sum of many parts behind the resource interface. The last-modified time would usually be 651 662 the most recent time that any of those parts were changed. How that value is determined for any given resource is an implementation 652 663 detail beyond the scope of this specification. What matters to HTTP is how recipients of the Last-Modified header field can 653 664 use its value to make conditional requests and test the validity of locally cached responses. 654 665 </p> 655 <p id="rfc.section.2.1.p.6">An origin server <em class="bcp14">MUST NOT</em> send a Last-Modified date which is later than the server's time of message origination. In such cases, where the resource's 656 last modification would indicate some time in the future, the server <em class="bcp14">MUST</em> replace that date with the message origination date. 657 </p> 658 <p id="rfc.section.2.1.p.7">An origin server <em class="bcp14">SHOULD</em> obtain the Last-Modified value of the representation as close as possible to the time that it generates the Date value of 659 its response. This allows a recipient to make an accurate assessment of the representation's modification time, especially 666 <p id="rfc.section.2.1.1.p.3">An origin server <em class="bcp14">SHOULD</em> obtain the Last-Modified value of the representation as close as possible to the time that it generates the Date field-value 667 for its response. This allows a recipient to make an accurate assessment of the representation's modification time, especially 660 668 if the representation changes near the time that the response is generated. 661 669 </p> 662 <p id="rfc.section.2.1.p.8">HTTP/1.1 servers <em class="bcp14">SHOULD</em> send Last-Modified whenever feasible. 663 </p> 664 <p id="rfc.section.2.1.p.9">The Last-Modified header field value is often used as a cache validator. In simple terms, a cache entry is considered to be 665 valid if the representation has not been modified since the Last-Modified value. 666 </p> 667 <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a> <a id="entity.tags" href="#entity.tags">Entity Tags</a></h2> 668 <p id="rfc.section.2.2.p.1">Entity-tags are used for comparing two or more representations of the same resource. HTTP/1.1 uses entity-tags in the ETag 669 (<a href="#header.etag" id="rfc.xref.header.etag.1" title="ETag">Section 2.2.1</a>), If-Match (<a href="#header.if-match" id="rfc.xref.header.if-match.1" title="If-Match">Section 3.1</a>), If-None-Match (<a href="#header.if-none-match" id="rfc.xref.header.if-none-match.1" title="If-None-Match">Section 3.2</a>), and If-Range (<a href="p5-range.html#header.if-range" title="If-Range">Section 5.3</a> of <a href="#Part5" id="rfc.xref.Part5.1"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>) header fields. The definition of how they are used and compared as cache validators is in <a href="#weak.and.strong.validators" title="Weak and Strong Validators">Section 2.3</a>. An entity-tag consists of an opaque quoted string, possibly prefixed by a weakness indicator. 670 </p> 671 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span><span id="rfc.iref.g.4"></span> <a href="#entity.tags" class="smpl">entity-tag</a> = [ <a href="#entity.tags" class="smpl">weak</a> ] <a href="#entity.tags" class="smpl">opaque-tag</a> 672 <a href="#entity.tags" class="smpl">weak</a> = %x57.2F ; "W/", case-sensitive 673 <a href="#entity.tags" class="smpl">opaque-tag</a> = <a href="#notation" class="smpl">quoted-string</a> 674 </pre><p id="rfc.section.2.2.p.3">A "strong entity-tag" <em class="bcp14">MAY</em> be shared by two representations of a resource only if they are equivalent by octet equality. 675 </p> 676 <p id="rfc.section.2.2.p.4">A "weak entity-tag", indicated by the "W/" prefix, <em class="bcp14">MAY</em> be shared by two representations of a resource. A weak entity-tag can only be used for weak comparison. 677 </p> 678 <p id="rfc.section.2.2.p.5">Cache entries might persist for arbitrarily long periods, regardless of expiration times, so it is inappropriate to expect 679 that a cache will never again attempt to validate an entry using a validator that it obtained at some point in the past. A 680 strong entity-tag <em class="bcp14">MUST</em> be unique across all versions of all representations associated with a particular resource over time. However, there is no 681 implication of uniqueness across entity-tags of different resources (i.e., the same entity-tag value might be in use for representations 682 of multiple resources at the same time and does not imply that those representations are equivalent). 670 <p id="rfc.section.2.1.1.p.4">An origin server with a clock <em class="bcp14">MUST NOT</em> send a Last-Modified date that is later than the server's time of message origination (Date). If the last modification time 671 is derived from implementation-specific metadata that evaluates to some time in the future, according to the origin server's 672 clock, then the origin server <em class="bcp14">MUST</em> replace that value with the message origination date. This prevents a future modification date from having an adverse impact 673 on cache validation. 674 </p> 675 <h3 id="rfc.section.2.1.2"><a href="#rfc.section.2.1.2">2.1.2</a> <a id="lastmod.comparison" href="#lastmod.comparison">Comparison</a></h3> 676 <p id="rfc.section.2.1.2.p.1">A Last-Modified time, when used as a validator in a request, is implicitly weak unless it is possible to deduce that it is 677 strong, using the following rules: 678 </p> 679 <ul> 680 <li>The validator is being compared by an origin server to the actual current validator for the representation and,</li> 681 <li>That origin server reliably knows that the associated representation did not change twice during the second covered by the 682 presented validator. 683 </li> 684 </ul> 685 <p id="rfc.section.2.1.2.p.2">or </p> 686 <ul> 687 <li>The validator is about to be used by a client in an If-Modified-Since or If-Unmodified-Since header field, because the client 688 has a cache entry for the associated representation, and 689 </li> 690 <li>That cache entry includes a Date value, which gives the time when the origin server sent the original response, and</li> 691 <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li> 692 </ul> 693 <p id="rfc.section.2.1.2.p.3">or </p> 694 <ul> 695 <li>The validator is being compared by an intermediate cache to the validator stored in its cache entry for the representation, 696 and 697 </li> 698 <li>That cache entry includes a Date value, which gives the time when the origin server sent the original response, and</li> 699 <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li> 700 </ul> 701 <p id="rfc.section.2.1.2.p.4">This method relies on the fact that if two different responses were sent by the origin server during the same second, but 702 both had the same Last-Modified time, then at least one of those responses would have a Date value equal to its Last-Modified 703 time. The arbitrary 60-second limit guards against the possibility that the Date and Last-Modified values are generated from 704 different clocks, or at somewhat different times during the preparation of the response. An implementation <em class="bcp14">MAY</em> use a value larger than 60 seconds, if it is believed that 60 seconds is too short. 683 705 </p> 684 706 <div id="rfc.iref.e.1"></div> 685 707 <div id="rfc.iref.h.2"></div> 686 <h3 id="rfc.section.2.2.1"><a href="#rfc.section.2.2.1">2.2.1</a> <a id="header.etag" href="#header.etag">ETag</a></h3> 687 <p id="rfc.section.2.2.1.p.1">The "ETag" header field provides the current value of the entity-tag (see <a href="#entity.tags" title="Entity Tags">Section 2.2</a>) for one representation of the target resource. An entity-tag is intended for use as a resource-local identifier for differentiating 688 between representations of the same resource that vary over time or via content negotiation (see <a href="#weak.and.strong.validators" title="Weak and Strong Validators">Section 2.3</a>). 689 </p> 690 <div id="rfc.figure.u.5"></div><pre class="inline"><span id="rfc.iref.g.5"></span> <a href="#header.etag" class="smpl">ETag</a> = <a href="#entity.tags" class="smpl">entity-tag</a> 691 </pre><div id="rfc.figure.u.6"></div> 708 <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a> <a id="header.etag" href="#header.etag">ETag</a></h2> 709 <p id="rfc.section.2.2.p.1">The ETag header field provides the current entity-tag for the selected representation. An entity-tag is an opaque validator 710 for differentiating between multiple representations of the same resource, regardless of whether those multiple representations 711 are due to resource state changes over time, content negotiation resulting in multiple representations being valid at the 712 same time, or both. An entity-tag consists of an opaque quoted string, possibly prefixed by a weakness indicator. 713 </p> 714 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span> <a href="#header.etag" class="smpl">ETag</a> = <a href="#header.etag" class="smpl">entity-tag</a> 715 716 <a href="#header.etag" class="smpl">entity-tag</a> = [ <a href="#header.etag" class="smpl">weak</a> ] <a href="#header.etag" class="smpl">opaque-tag</a> 717 <a href="#header.etag" class="smpl">weak</a> = %x57.2F ; "W/", case-sensitive 718 <a href="#header.etag" class="smpl">opaque-tag</a> = <a href="#notation" class="smpl">quoted-string</a> 719 </pre><p id="rfc.section.2.2.p.3">An entity-tag can be more reliable for validation than a modification date in situations where it is inconvenient to store 720 modification dates, where the one-second resolution of HTTP date values is not sufficient, or where modification dates are 721 not consistently maintained. 722 </p> 723 <div id="rfc.figure.u.5"></div> 692 724 <p>Examples:</p> <pre class="text"> ETag: "xyzzy" 693 725 ETag: W/"xyzzy" 694 726 ETag: "" 695 </pre><p id="rfc.section.2.2.1.p.4">An entity-tag provides an "opaque" cache validator that allows for more reliable validation than modification dates in situations 696 where it is inconvenient to store modification dates, where the one-second resolution of HTTP date values is not sufficient, 697 or where the origin server wishes to avoid certain paradoxes that might arise from the use of modification dates. 698 </p> 699 <p id="rfc.section.2.2.1.p.5">The principle behind entity-tags is that only the service author knows the semantics of a resource well enough to select an 700 appropriate cache validation mechanism, and the specification of any validator comparison function more complex than byte-equality 701 would open up a can of worms. Thus, comparisons of any other header fields (except Last-Modified, for compatibility with HTTP/1.0) 702 are never used for purposes of validating a cache entry. 703 </p> 704 <h3 id="rfc.section.2.2.2"><a href="#rfc.section.2.2.2">2.2.2</a> <a id="example.entity.tag.vs.conneg" href="#example.entity.tag.vs.conneg">Example: Entity-tags varying on Content-Negotiated Resources</a></h3> 705 <p id="rfc.section.2.2.2.p.1">Consider a resource that is subject to content negotiation (<a href="p3-payload.html#content.negotiation" title="Content Negotiation">Section 5</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 6.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>): 706 </p> 707 <div id="rfc.figure.u.7"></div> 708 <p>>> Request:</p><pre class="text2">GET /index HTTP/1.1 709 Host: www.example.com 710 Accept-Encoding: gzip 711 712 </pre><p id="rfc.section.2.2.2.p.3">In this case, the response might or might not use the gzip content coding. If it does not, the response might look like:</p> 713 <div id="rfc.figure.u.8"></div> 714 <p>>> Response:</p><pre class="text">HTTP/1.1 200 OK 715 Date: Thu, 26 Mar 2010 00:05:00 GMT 716 ETag: "123-a" 717 Content-Length: 70 718 Vary: Accept-Encoding 719 Content-Type: text/plain 720 721 <span id="exbody">Hello World! 722 Hello World! 723 Hello World! 724 Hello World! 725 Hello World! 726 </span></pre><p id="rfc.section.2.2.2.p.5">An alternative representation that does use gzip content coding would be:</p> 727 <div id="rfc.figure.u.9"></div> 728 <p>>> Response:</p><pre class="text">HTTP/1.1 200 OK 729 Date: Thu, 26 Mar 2010 00:05:00 GMT 730 ETag: "123-b" 731 Content-Length: 43 732 Vary: Accept-Encoding 733 Content-Type: text/plain 734 Content-Encoding: gzip 735 736 <em>...binary data...</em></pre><div class="note" id="rfc.section.2.2.2.p.7"> 737 <p> <b>Note:</b> Content codings are a property of the representation, so therefore an entity-tag of an encoded representation must be distinct 738 from an unencoded representation to prevent conflicts during cache updates and range requests. In contrast, transfer codings 739 (<a href="p1-messaging.html#transfer.codings" title="Transfer Codings">Section 6.2</a> of <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) apply only during message transfer and do not require distinct entity-tags. 740 </p> 741 </div> 742 <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a> <a id="weak.and.strong.validators" href="#weak.and.strong.validators">Weak and Strong Validators</a></h2> 743 <p id="rfc.section.2.3.p.1">Since both origin servers and caches will compare two validators to decide if they represent the same or different representations, 727 </pre><h3 id="rfc.section.2.2.1"><a href="#rfc.section.2.2.1">2.2.1</a> <a id="entity.tag.generation" href="#entity.tag.generation">Generation</a></h3> 728 <p id="rfc.section.2.2.1.p.1">The principle behind entity-tags is that only the service author knows the implementation of a resource well enough to select 729 the most accurate and efficient validation mechanism for that resource, and that any such mechanism can be mapped to a simple 730 sequence of octets for easy comparison. Since the value is opaque, there is no need for the client to be aware of how each 731 entity-tag is constructed. 732 </p> 733 <p id="rfc.section.2.2.1.p.2">For example, a resource that has implementation-specific versioning applied to all changes might use an internal revision 734 number, perhaps combined with a variance identifier for content negotiation, to accurately differentiate between representations. 735 Other implementations might use a stored hash of representation content, a combination of various filesystem attributes, or 736 a modification timestamp that has sub-second resolution. 737 </p> 738 <p id="rfc.section.2.2.1.p.3">Origin servers <em class="bcp14">SHOULD</em> send ETag for any selected representation for which detection of changes can be reasonably and consistently determined, since 739 the entity-tag's use in conditional requests and evaluating cache freshness (<a href="#Part6" id="rfc.xref.Part6.3"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) can result in a substantial reduction of HTTP network traffic and can be a significant factor in improving service scalability 740 and reliability. 741 </p> 742 <h3 id="rfc.section.2.2.2"><a href="#rfc.section.2.2.2">2.2.2</a> <a id="weak.and.strong.validators" href="#weak.and.strong.validators">Weak versus Strong</a></h3> 743 <p id="rfc.section.2.2.2.p.1">Since both origin servers and caches will compare two validators to decide if they indicate the same or different representations, 744 744 one normally would expect that if the representation (including both representation header fields and representation body) 745 changes in any way, then the associated validator would change as well. If this is true, then we call th isvalidator a "strong745 changes in any way, then the associated validator would change as well. If this is true, then we call that validator a "strong 746 746 validator". One example of a strong validator is an integer that is incremented in stable storage every time a representation 747 747 is changed. 748 748 </p> 749 <p id="rfc.section.2. 3.p.2">However, there might be cases when a server prefers to change the validator only when it desires cached representations to749 <p id="rfc.section.2.2.2.p.2">However, there might be cases when a server prefers to change the validator only when it desires cached representations to 750 750 be invalidated. For example, the representation of a weather report that changes in content every second, based on dynamic 751 751 measurements, might be grouped into sets of equivalent representations (from the origin server's perspective) in order to … … 753 753 or weather quality). A validator that does not always change when the representation changes is a "weak validator". 754 754 </p> 755 <p id="rfc.section.2. 3.p.3">An entity-tag is normally a strong validator, but the protocol provides a mechanism to tag an entity-tag as "weak". One can756 think of a strong validator as part of an identifier for a specific representation, whereas a weak validator is part of an757 identifier for a set of equivalent representations (where this notion of equivalence is entirely governed by the origin server758 and beyond the scope of this specification).759 < /p>755 <p id="rfc.section.2.2.2.p.3">One can think of a strong validator as part of an identifier for a specific representation, whereas a weak validator is part 756 of an identifier for a set of equivalent representations (where this notion of equivalence is entirely governed by the origin 757 server and beyond the scope of this specification). 758 </p> 759 <p id="rfc.section.2.2.2.p.4">An entity-tag is normally a strong validator, but the protocol provides a mechanism to tag an entity-tag as "weak". </p> 760 760 <ul class="empty"> 761 761 <li>A representation's modification time, if defined with only one-second resolution, could be a weak validator, since it is possible … … 767 767 </li> 768 768 </ul> 769 <p id="rfc.section.2. 3.p.4">A strong entity-tag <em class="bcp14">MUST</em> change whenever the associated representation changes in any way. A weak entity-tag <em class="bcp14">SHOULD</em> change whenever the origin server considers prior representations to be unacceptable as a substitute for the current representation.769 <p id="rfc.section.2.2.2.p.5">A strong entity-tag <em class="bcp14">MUST</em> change whenever the associated representation changes in any way. A weak entity-tag <em class="bcp14">SHOULD</em> change whenever the origin server considers prior representations to be unacceptable as a substitute for the current representation. 770 770 In other words, a weak entity tag <em class="bcp14">SHOULD</em> change whenever the origin server wants caches to invalidate old responses. 771 771 </p> 772 <p id="rfc.section.2.3.p.5">A "use" of a validator is either when a client generates a request and includes the validator in a validating header field, 773 or when a server compares two validators. 774 </p> 775 <p id="rfc.section.2.3.p.6">Strong validators are usable in any context. Weak validators are only usable in contexts that do not depend on exact equality 776 of a representation. For example, either kind is usable for a normal conditional GET. However, only a strong validator is 777 usable for range retrieval (<a href="#Part5" id="rfc.xref.Part5.2"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>), since otherwise the client might end up with an internally inconsistent representation. Clients <em class="bcp14">MUST NOT</em> use weak validators in range requests. 778 </p> 779 <p id="rfc.section.2.3.p.7">The only function that HTTP/1.1 defines on validators is comparison. There are two validator comparison functions, depending 780 on whether the comparison context allows the use of weak validators or not: 772 <p id="rfc.section.2.2.2.p.6">A "strong entity-tag" <em class="bcp14">MAY</em> be shared by two representations of a resource only if they are equivalent by octet equality. 773 </p> 774 <p id="rfc.section.2.2.2.p.7">A "weak entity-tag", indicated by the "W/" prefix, <em class="bcp14">MAY</em> be shared by two representations of a resource. A weak entity-tag can only be used for weak comparison. 775 </p> 776 <p id="rfc.section.2.2.2.p.8">Cache entries might persist for arbitrarily long periods, regardless of expiration times. Thus, a cache might attempt to validate 777 an entry using a validator that it obtained in the distant past. A strong entity-tag <em class="bcp14">MUST</em> be unique across all versions of all representations associated with a particular resource over time. However, there is no 778 implication of uniqueness across entity-tags of different resources (i.e., the same entity-tag value might be in use for representations 779 of multiple resources at the same time and does not imply that those representations are equivalent). 780 </p> 781 <h3 id="rfc.section.2.2.3"><a href="#rfc.section.2.2.3">2.2.3</a> <a id="entity.tag.comparison" href="#entity.tag.comparison">Comparison</a></h3> 782 <p id="rfc.section.2.2.3.p.1">There are two entity-tag comparison functions, depending on whether the comparison context allows the use of weak validators 783 or not: 781 784 </p> 782 785 <ul> … … 786 789 </li> 787 790 </ul> 788 <p id="rfc.section.2.3.p.8">The example below shows the results for a set of entity-tag pairs, and both the weak and strong comparison function results:</p> 791 <p id="rfc.section.2.2.3.p.2">A "use" of a validator is either when a client generates a request and includes the validator in a precondition, or when a 792 server compares two validators. 793 </p> 794 <p id="rfc.section.2.2.3.p.3">Strong validators are usable in any context. Weak validators are only usable in contexts that do not depend on exact equality 795 of a representation. For example, either kind is usable for a normal conditional GET. 796 </p> 797 <p id="rfc.section.2.2.3.p.4">The example below shows the results for a set of entity-tag pairs, and both the weak and strong comparison function results:</p> 789 798 <div id="rfc.table.u.1"> 790 799 <table class="tt full left" cellpadding="3" cellspacing="0"> … … 825 834 </table> 826 835 </div> 827 <p id="rfc.section.2.3.p.9">An entity-tag is strong unless it is explicitly tagged as weak. <a href="#entity.tags" title="Entity Tags">Section 2.2</a> gives the syntax for entity-tags. 828 </p> 829 <p id="rfc.section.2.3.p.10">A Last-Modified time, when used as a validator in a request, is implicitly weak unless it is possible to deduce that it is 830 strong, using the following rules: 831 </p> 832 <ul> 833 <li>The validator is being compared by an origin server to the actual current validator for the representation and,</li> 834 <li>That origin server reliably knows that the associated representation did not change twice during the second covered by the 835 presented validator. 836 </li> 837 </ul> 838 <p id="rfc.section.2.3.p.11">or </p> 839 <ul> 840 <li>The validator is about to be used by a client in an If-Modified-Since or If-Unmodified-Since header field, because the client 841 has a cache entry for the associated representation, and 842 </li> 843 <li>That cache entry includes a Date value, which gives the time when the origin server sent the original response, and</li> 844 <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li> 845 </ul> 846 <p id="rfc.section.2.3.p.12">or </p> 847 <ul> 848 <li>The validator is being compared by an intermediate cache to the validator stored in its cache entry for the representation, 849 and 850 </li> 851 <li>That cache entry includes a Date value, which gives the time when the origin server sent the original response, and</li> 852 <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li> 853 </ul> 854 <p id="rfc.section.2.3.p.13">This method relies on the fact that if two different responses were sent by the origin server during the same second, but 855 both had the same Last-Modified time, then at least one of those responses would have a Date value equal to its Last-Modified 856 time. The arbitrary 60-second limit guards against the possibility that the Date and Last-Modified values are generated from 857 different clocks, or at somewhat different times during the preparation of the response. An implementation <em class="bcp14">MAY</em> use a value larger than 60 seconds, if it is believed that 60 seconds is too short. 858 </p> 859 <p id="rfc.section.2.3.p.14">If a client wishes to perform a sub-range retrieval on a value for which it has only a Last-Modified time and no opaque validator, 860 it <em class="bcp14">MAY</em> do this only if the Last-Modified time is strong in the sense described here. 861 </p> 862 <p id="rfc.section.2.3.p.15">A cache or origin server receiving a conditional range request (<a href="#Part5" id="rfc.xref.Part5.3"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>) <em class="bcp14">MUST</em> use the strong comparison function to evaluate the condition. 863 </p> 864 <p id="rfc.section.2.3.p.16">These rules allow HTTP/1.1 caches and clients to safely perform sub-range retrievals on values that have been obtained from 865 HTTP/1.0 servers. 866 </p> 867 <h2 id="rfc.section.2.4"><a href="#rfc.section.2.4">2.4</a> <a id="rules.for.when.to.use.entity.tags.and.last-modified.dates" href="#rules.for.when.to.use.entity.tags.and.last-modified.dates">Rules for When to Use Entity-tags and Last-Modified Dates</a></h2> 868 <p id="rfc.section.2.4.p.1">We adopt a set of rules and recommendations for origin servers, clients, and caches regarding when various validator types 836 <p id="rfc.section.2.2.3.p.5">An entity-tag is strong unless it is explicitly tagged as weak.</p> 837 <h3 id="rfc.section.2.2.4"><a href="#rfc.section.2.2.4">2.2.4</a> <a id="rules.for.when.to.use.entity.tags.and.last-modified.dates" href="#rules.for.when.to.use.entity.tags.and.last-modified.dates">Rules for When to Use Entity-tags and Last-Modified Dates</a></h3> 838 <p id="rfc.section.2.2.4.p.1">We adopt a set of rules and recommendations for origin servers, clients, and caches regarding when various validator types 869 839 ought to be used, and for what purposes. 870 840 </p> 871 <p id="rfc.section.2. 4.p.2">HTTP/1.1 origin servers: </p>841 <p id="rfc.section.2.2.4.p.2">HTTP/1.1 origin servers: </p> 872 842 <ul> 873 843 <li><em class="bcp14">SHOULD</em> send an entity-tag validator unless it is not feasible to generate one. … … 879 849 </li> 880 850 </ul> 881 <p id="rfc.section.2. 4.p.3">In other words, the preferred behavior for an HTTP/1.1 origin server is to send both a strong entity-tag and a Last-Modified851 <p id="rfc.section.2.2.4.p.3">In other words, the preferred behavior for an HTTP/1.1 origin server is to send both a strong entity-tag and a Last-Modified 882 852 value. 883 853 </p> 884 <p id="rfc.section.2. 4.p.4">HTTP/1.1 clients: </p>854 <p id="rfc.section.2.2.4.p.4">HTTP/1.1 clients: </p> 885 855 <ul> 886 856 <li><em class="bcp14">MUST</em> use that entity-tag in any cache-conditional request (using If-Match or If-None-Match) if an entity-tag has been provided … … 897 867 </li> 898 868 </ul> 899 <p id="rfc.section.2. 4.p.5">An HTTP/1.1 origin server, upon receiving a conditional request that includes both a Last-Modified date (e.g., in an If-Modified-Since869 <p id="rfc.section.2.2.4.p.5">An HTTP/1.1 origin server, upon receiving a conditional request that includes both a Last-Modified date (e.g., in an If-Modified-Since 900 870 or If-Unmodified-Since header field) and one or more entity-tags (e.g., in an If-Match, If-None-Match, or If-Range header 901 871 field) as cache validators, <em class="bcp14">MUST NOT</em> return a response status code of 304 (Not Modified) unless doing so is consistent with all of the conditional header fields 902 872 in the request. 903 873 </p> 904 <p id="rfc.section.2. 4.p.6">An HTTP/1.1 caching proxy, upon receiving a conditional request that includes both a Last-Modified date and one or more entity-tags874 <p id="rfc.section.2.2.4.p.6">An HTTP/1.1 caching proxy, upon receiving a conditional request that includes both a Last-Modified date and one or more entity-tags 905 875 as cache validators, <em class="bcp14">MUST NOT</em> return a locally cached response to the client unless that cached response is consistent with all of the conditional header 906 876 fields in the request. … … 917 887 </li> 918 888 </ul> 889 <h3 id="rfc.section.2.2.5"><a href="#rfc.section.2.2.5">2.2.5</a> <a id="example.entity.tag.vs.conneg" href="#example.entity.tag.vs.conneg">Example: Entity-tags varying on Content-Negotiated Resources</a></h3> 890 <p id="rfc.section.2.2.5.p.1">Consider a resource that is subject to content negotiation (<a href="p3-payload.html#content.negotiation" title="Content Negotiation">Section 5</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 6.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>): 891 </p> 892 <div id="rfc.figure.u.6"></div> 893 <p>>> Request:</p><pre class="text2">GET /index HTTP/1.1 894 Host: www.example.com 895 Accept-Encoding: gzip 896 897 </pre><p id="rfc.section.2.2.5.p.3">In this case, the response might or might not use the gzip content coding. If it does not, the response might look like:</p> 898 <div id="rfc.figure.u.7"></div> 899 <p>>> Response:</p><pre class="text">HTTP/1.1 200 OK 900 Date: Thu, 26 Mar 2010 00:05:00 GMT 901 ETag: "123-a" 902 Content-Length: 70 903 Vary: Accept-Encoding 904 Content-Type: text/plain 905 906 <span id="exbody">Hello World! 907 Hello World! 908 Hello World! 909 Hello World! 910 Hello World! 911 </span></pre><p id="rfc.section.2.2.5.p.5">An alternative representation that does use gzip content coding would be:</p> 912 <div id="rfc.figure.u.8"></div> 913 <p>>> Response:</p><pre class="text">HTTP/1.1 200 OK 914 Date: Thu, 26 Mar 2010 00:05:00 GMT 915 ETag: "123-b" 916 Content-Length: 43 917 Vary: Accept-Encoding 918 Content-Type: text/plain 919 Content-Encoding: gzip 920 921 <em>...binary data...</em></pre><div class="note" id="rfc.section.2.2.5.p.7"> 922 <p> <b>Note:</b> Content codings are a property of the representation, so therefore an entity-tag of an encoded representation must be distinct 923 from an unencoded representation to prevent conflicts during cache updates and range requests. In contrast, transfer codings 924 (<a href="p1-messaging.html#transfer.codings" title="Transfer Codings">Section 6.2</a> of <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) apply only during message transfer and do not require distinct entity-tags. 925 </p> 926 </div> 919 927 <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a> <a id="header.fields" href="#header.fields">Precondition Header Fields</a></h1> 920 928 <p id="rfc.section.3.p.1">This section defines the syntax and semantics of HTTP/1.1 header fields for applying preconditions on requests.</p> … … 927 935 An If-Match field-value of "*" places the precondition on the existence of any current representation for the target resource. 928 936 </p> 929 <div id="rfc.figure.u. 10"></div><pre class="inline"><span id="rfc.iref.g.6"></span> <a href="#header.if-match" class="smpl">If-Match</a> = "*" / 1#<a href="#entity.tags" class="smpl">entity-tag</a>937 <div id="rfc.figure.u.9"></div><pre class="inline"><span id="rfc.iref.g.6"></span> <a href="#header.if-match" class="smpl">If-Match</a> = "*" / 1#<a href="#header.etag" class="smpl">entity-tag</a> 930 938 </pre><p id="rfc.section.3.1.p.3">If any of the entity-tags listed in the If-Match field value match the entity-tag of the selected representation for the target 931 939 resource, or if "*" is given and any current representation exists for the target resource, then the server <em class="bcp14">MAY</em> perform the request method as if the If-Match header field was not present. … … 937 945 </p> 938 946 <p id="rfc.section.3.1.p.6">Examples:</p> 939 <div id="rfc.figure.u.1 1"></div><pre class="text"> If-Match: "xyzzy"947 <div id="rfc.figure.u.10"></div><pre class="text"> If-Match: "xyzzy" 940 948 If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" 941 949 If-Match: * … … 957 965 for the target resource. 958 966 </p> 959 <div id="rfc.figure.u.1 2"></div><pre class="inline"><span id="rfc.iref.g.7"></span> <a href="#header.if-none-match" class="smpl">If-None-Match</a> = "*" / 1#<a href="#entity.tags" class="smpl">entity-tag</a>967 <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.7"></span> <a href="#header.if-none-match" class="smpl">If-None-Match</a> = "*" / 1#<a href="#header.etag" class="smpl">entity-tag</a> 960 968 </pre><p id="rfc.section.3.2.p.4">If any of the entity-tags listed in the If-None-Match field-value match the entity-tag of the selected representation, or 961 969 if "*" is given and any current representation exists for that resource, then the server <em class="bcp14">MUST NOT</em> perform the requested method. Instead, if the request method was GET or HEAD, the server <em class="bcp14">SHOULD</em> respond with a 304 (Not Modified) status code, including the cache-related header fields (particularly ETag) of the selected … … 965 973 </p> 966 974 <p id="rfc.section.3.2.p.6">If the request would, without the If-None-Match header field, result in anything other than a 2xx or 304 status code, then 967 the If-None-Match header field <em class="bcp14">MUST</em> be ignored. (See <a href="#rules.for.when.to.use.entity.tags.and.last-modified.dates" title="Rules for When to Use Entity-tags and Last-Modified Dates">Section 2. 4</a> for a discussion of server behavior when both If-Modified-Since and If-None-Match appear in the same request.)975 the If-None-Match header field <em class="bcp14">MUST</em> be ignored. (See <a href="#rules.for.when.to.use.entity.tags.and.last-modified.dates" title="Rules for When to Use Entity-tags and Last-Modified Dates">Section 2.2.4</a> for a discussion of server behavior when both If-Modified-Since and If-None-Match appear in the same request.) 968 976 </p> 969 977 <p id="rfc.section.3.2.p.7">Examples:</p> 970 <div id="rfc.figure.u.1 3"></div><pre class="text"> If-None-Match: "xyzzy"978 <div id="rfc.figure.u.12"></div><pre class="text"> If-None-Match: "xyzzy" 971 979 If-None-Match: W/"xyzzy" 972 980 If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" … … 982 990 the time specified in this field, then do not perform the request method; instead, respond as detailed below. 983 991 </p> 984 <div id="rfc.figure.u.1 4"></div><pre class="inline"><span id="rfc.iref.g.8"></span> <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = <a href="#notation" class="smpl">HTTP-date</a>992 <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.8"></span> <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = <a href="#notation" class="smpl">HTTP-date</a> 985 993 </pre><p id="rfc.section.3.3.p.3">An example of the field is:</p> 986 <div id="rfc.figure.u.1 5"></div><pre class="text"> If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT994 <div id="rfc.figure.u.14"></div><pre class="text"> If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT 987 995 </pre><p id="rfc.section.3.3.p.5">A GET method with an If-Modified-Since header field and no Range header field requests that the selected representation be 988 996 transferred only if it has been modified since the date given by the If-Modified-Since header field. The algorithm for determining … … 1002 1010 <p id="rfc.section.3.3.p.6">The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. </p> 1003 1011 <ul class="empty"> 1004 <li> <b>Note:</b> The Range header field modifies the meaning of If-Modified-Since; see <a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5. 4"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a> for full details.1012 <li> <b>Note:</b> The Range header field modifies the meaning of If-Modified-Since; see <a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.1"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a> for full details. 1005 1013 </li> 1006 1014 <li> <b>Note:</b> If-Modified-Since times are interpreted by the server, whose clock might not be synchronized with the client. … … 1030 1038 the time specified in this field, the server <em class="bcp14">SHOULD</em> perform the request method as if the If-Unmodified-Since header field were not present. 1031 1039 </p> 1032 <div id="rfc.figure.u.1 6"></div><pre class="inline"><span id="rfc.iref.g.9"></span> <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = <a href="#notation" class="smpl">HTTP-date</a>1040 <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.9"></span> <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = <a href="#notation" class="smpl">HTTP-date</a> 1033 1041 </pre><p id="rfc.section.3.4.p.3">An example of the field is:</p> 1034 <div id="rfc.figure.u.1 7"></div><pre class="text"> If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT1042 <div id="rfc.figure.u.16"></div><pre class="text"> If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT 1035 1043 </pre><p id="rfc.section.3.4.p.5">If the request normally (i.e., without the If-Unmodified-Since header field) would result in anything other than a 2xx or 1036 1044 412 status code, the If-Unmodified-Since header field <em class="bcp14">SHOULD</em> be ignored. … … 1040 1048 <p id="rfc.section.3.4.p.7">The result of a request having both an If-Unmodified-Since header field and either an If-None-Match or an If-Modified-Since 1041 1049 header fields is undefined by this specification. 1050 </p> 1051 <h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a> <a id="header.if-range" href="#header.if-range">If-Range</a></h2> 1052 <p id="rfc.section.3.5.p.1">The If-Range header field provides a special conditional request mechanism that is similar to If-Match and If-Unmodified-Since 1053 but specific to HTTP range requests. If-Range is defined in <a href="p5-range.html#header.if-range" title="If-Range">Section 5.3</a> of <a href="#Part5" id="rfc.xref.Part5.2"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. 1042 1054 </p> 1043 1055 <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a id="status.code.definitions" href="#status.code.definitions">Status Code Definitions</a></h1> … … 1120 1132 <td class="left">http</td> 1121 1133 <td class="left">standard</td> 1122 <td class="left"> <a href="#header.etag" id="rfc.xref.header.etag. 2" title="ETag">Section 2.2.1</a>1134 <td class="left"> <a href="#header.etag" id="rfc.xref.header.etag.1" title="ETag">Section 2.2</a> 1123 1135 </td> 1124 1136 </tr> … … 1127 1139 <td class="left">http</td> 1128 1140 <td class="left">standard</td> 1129 <td class="left"> <a href="#header.if-match" id="rfc.xref.header.if-match. 2" title="If-Match">Section 3.1</a>1141 <td class="left"> <a href="#header.if-match" id="rfc.xref.header.if-match.1" title="If-Match">Section 3.1</a> 1130 1142 </td> 1131 1143 </tr> … … 1141 1153 <td class="left">http</td> 1142 1154 <td class="left">standard</td> 1143 <td class="left"> <a href="#header.if-none-match" id="rfc.xref.header.if-none-match. 2" title="If-None-Match">Section 3.2</a>1155 <td class="left"> <a href="#header.if-none-match" id="rfc.xref.header.if-none-match.1" title="If-None-Match">Section 3.2</a> 1144 1156 </td> 1145 1157 </tr> … … 1240 1252 </div> 1241 1253 <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a> <a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h1> 1242 <p id="rfc.section.A.p.1">Allow weak entity-tags in all requests except range requests (Sections <a href="#weak.and.strong.validators" title="Weak and Strong Validators">2.3</a> and <a href="#header.if-none-match" id="rfc.xref.header.if-none-match.3" title="If-None-Match">3.2</a>).1254 <p id="rfc.section.A.p.1">Allow weak entity-tags in all requests except range requests (Sections <a href="#weak.and.strong.validators" title="Weak versus Strong">2.2.2</a> and <a href="#header.if-none-match" id="rfc.xref.header.if-none-match.2" title="If-None-Match">3.2</a>). 1243 1255 </p> 1244 1256 <p id="rfc.section.A.p.2">Change ABNF productions for header fields to only define the field value. (<a href="#header.fields" title="Precondition Header Fields">Section 3</a>) 1245 1257 </p> 1246 1258 <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a> <a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1> 1247 <div id="rfc.figure.u.1 8"></div> <pre class="inline"><a href="#header.etag" class="smpl">ETag</a> = entity-tag1259 <div id="rfc.figure.u.17"></div> <pre class="inline"><a href="#header.etag" class="smpl">ETag</a> = entity-tag 1248 1260 1249 1261 <a href="#notation" class="smpl">HTTP-date</a> = <HTTP-date, defined in [Part1], Section 6.1> … … 1260 1272 <a href="#notation" class="smpl">OWS</a> = <OWS, defined in [Part1], Section 1.2.2> 1261 1273 1262 <a href="# entity.tags" class="smpl">entity-tag</a> = [ weak ] opaque-tag1263 1264 <a href="# entity.tags" class="smpl">opaque-tag</a> = quoted-string1274 <a href="#header.etag" class="smpl">entity-tag</a> = [ weak ] opaque-tag 1275 1276 <a href="#header.etag" class="smpl">opaque-tag</a> = quoted-string 1265 1277 1266 1278 <a href="#notation" class="smpl">quoted-string</a> = <quoted-string, defined in [Part1], Section 1.2.2> 1267 1279 1268 <a href="# entity.tags" class="smpl">weak</a> = %x57.2F ; W/1269 </pre> <div id="rfc.figure.u.1 9"></div>1280 <a href="#header.etag" class="smpl">weak</a> = %x57.2F ; W/ 1281 </pre> <div id="rfc.figure.u.18"></div> 1270 1282 <p>ABNF diagnostics:</p><pre class="inline">; ETag defined but not used 1271 1283 ; If-Match defined but not used … … 1392 1404 </li> 1393 1405 <li><a id="rfc.index.E" href="#rfc.index.E"><b>E</b></a><ul> 1394 <li>ETag header field <a href="#rfc. xref.header.etag.1">2.2</a>, <a href="#rfc.iref.e.1"><b>2.2.1</b></a>, <a href="#rfc.xref.header.etag.2">5.2</a></li>1406 <li>ETag header field <a href="#rfc.iref.e.1"><b>2.2</b></a>, <a href="#rfc.xref.header.etag.1">5.2</a></li> 1395 1407 </ul> 1396 1408 </li> … … 1398 1410 <li><tt>Grammar</tt> 1399 1411 <ul> 1400 <li><tt>entity-tag</tt> <a href="#rfc.iref.g. 2"><b>2.2</b></a></li>1401 <li><tt>ETag</tt> <a href="#rfc.iref.g. 5"><b>2.2.1</b></a></li>1412 <li><tt>entity-tag</tt> <a href="#rfc.iref.g.3"><b>2.2</b></a></li> 1413 <li><tt>ETag</tt> <a href="#rfc.iref.g.2"><b>2.2</b></a></li> 1402 1414 <li><tt>If-Match</tt> <a href="#rfc.iref.g.6"><b>3.1</b></a></li> 1403 1415 <li><tt>If-Modified-Since</tt> <a href="#rfc.iref.g.8"><b>3.3</b></a></li> … … 1405 1417 <li><tt>If-Unmodified-Since</tt> <a href="#rfc.iref.g.9"><b>3.4</b></a></li> 1406 1418 <li><tt>Last-Modified</tt> <a href="#rfc.iref.g.1"><b>2.1</b></a></li> 1407 <li><tt>opaque-tag</tt> <a href="#rfc.iref.g. 4"><b>2.2</b></a></li>1408 <li><tt>weak</tt> <a href="#rfc.iref.g. 3"><b>2.2</b></a></li>1419 <li><tt>opaque-tag</tt> <a href="#rfc.iref.g.5"><b>2.2</b></a></li> 1420 <li><tt>weak</tt> <a href="#rfc.iref.g.4"><b>2.2</b></a></li> 1409 1421 </ul> 1410 1422 </li> … … 1414 1426 <li>Header Fields 1415 1427 <ul> 1416 <li>ETag <a href="#rfc. xref.header.etag.1">2.2</a>, <a href="#rfc.iref.h.2"><b>2.2.1</b></a>, <a href="#rfc.xref.header.etag.2">5.2</a></li>1417 <li>If-Match <a href="#rfc. xref.header.if-match.1">2.2</a>, <a href="#rfc.iref.h.3"><b>3.1</b></a>, <a href="#rfc.xref.header.if-match.2">5.2</a></li>1428 <li>ETag <a href="#rfc.iref.h.2"><b>2.2</b></a>, <a href="#rfc.xref.header.etag.1">5.2</a></li> 1429 <li>If-Match <a href="#rfc.iref.h.3"><b>3.1</b></a>, <a href="#rfc.xref.header.if-match.1">5.2</a></li> 1418 1430 <li>If-Modified-Since <a href="#rfc.iref.h.5"><b>3.3</b></a>, <a href="#rfc.xref.header.if-modified-since.1">5.2</a></li> 1419 <li>If-None-Match <a href="#rfc. xref.header.if-none-match.1">2.2</a>, <a href="#rfc.iref.h.4"><b>3.2</b></a>, <a href="#rfc.xref.header.if-none-match.2">5.2</a>, <a href="#rfc.xref.header.if-none-match.3">A</a></li>1431 <li>If-None-Match <a href="#rfc.iref.h.4"><b>3.2</b></a>, <a href="#rfc.xref.header.if-none-match.1">5.2</a>, <a href="#rfc.xref.header.if-none-match.2">A</a></li> 1420 1432 <li>If-Unmodified-Since <a href="#rfc.iref.h.6"><b>3.4</b></a>, <a href="#rfc.xref.header.if-unmodified-since.1">5.2</a></li> 1421 1433 <li>Last-Modified <a href="#rfc.iref.h.1"><b>2.1</b></a>, <a href="#rfc.xref.header.last-modified.1">5.2</a></li> … … 1425 1437 </li> 1426 1438 <li><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul> 1427 <li>If-Match header field <a href="#rfc. xref.header.if-match.1">2.2</a>, <a href="#rfc.iref.i.1"><b>3.1</b></a>, <a href="#rfc.xref.header.if-match.2">5.2</a></li>1439 <li>If-Match header field <a href="#rfc.iref.i.1"><b>3.1</b></a>, <a href="#rfc.xref.header.if-match.1">5.2</a></li> 1428 1440 <li>If-Modified-Since header field <a href="#rfc.iref.i.3"><b>3.3</b></a>, <a href="#rfc.xref.header.if-modified-since.1">5.2</a></li> 1429 <li>If-None-Match header field <a href="#rfc. xref.header.if-none-match.1">2.2</a>, <a href="#rfc.iref.i.2"><b>3.2</b></a>, <a href="#rfc.xref.header.if-none-match.2">5.2</a>, <a href="#rfc.xref.header.if-none-match.3">A</a></li>1441 <li>If-None-Match header field <a href="#rfc.iref.i.2"><b>3.2</b></a>, <a href="#rfc.xref.header.if-none-match.1">5.2</a>, <a href="#rfc.xref.header.if-none-match.2">A</a></li> 1430 1442 <li>If-Unmodified-Since header field <a href="#rfc.iref.i.4"><b>3.4</b></a>, <a href="#rfc.xref.header.if-unmodified-since.1">5.2</a></li> 1431 1443 </ul> … … 1440 1452 </li> 1441 1453 <li><a id="rfc.index.P" href="#rfc.index.P"><b>P</b></a><ul> 1442 <li><em>Part1</em> <a href="#rfc.xref.Part1.1">1.2</a>, <a href="#rfc.xref.Part1.2">1.2</a>, <a href="#rfc.xref.Part1.3">1.2</a>, <a href="#rfc.xref.Part1.4">1.2</a>, <a href="#rfc.xref.Part1.5">2.2. 2</a>, <a href="#rfc.xref.Part1.6">4.1</a>, <a href="#rfc.xref.Part1.7">4.1</a>, <a href="#rfc.xref.Part1.8">6</a>, <a href="#Part1"><b>8.1</b></a><ul>1454 <li><em>Part1</em> <a href="#rfc.xref.Part1.1">1.2</a>, <a href="#rfc.xref.Part1.2">1.2</a>, <a href="#rfc.xref.Part1.3">1.2</a>, <a href="#rfc.xref.Part1.4">1.2</a>, <a href="#rfc.xref.Part1.5">2.2.5</a>, <a href="#rfc.xref.Part1.6">4.1</a>, <a href="#rfc.xref.Part1.7">4.1</a>, <a href="#rfc.xref.Part1.8">6</a>, <a href="#Part1"><b>8.1</b></a><ul> 1443 1455 <li><em>Section 1.2</em> <a href="#rfc.xref.Part1.1">1.2</a></li> 1444 1456 <li><em>Section 1.2.2</em> <a href="#rfc.xref.Part1.2">1.2</a>, <a href="#rfc.xref.Part1.3">1.2</a></li> 1445 1457 <li><em>Section 6.1</em> <a href="#rfc.xref.Part1.4">1.2</a></li> 1446 <li><em>Section 6.2</em> <a href="#rfc.xref.Part1.5">2.2. 2</a></li>1458 <li><em>Section 6.2</em> <a href="#rfc.xref.Part1.5">2.2.5</a></li> 1447 1459 <li><em>Section 9.3</em> <a href="#rfc.xref.Part1.6">4.1</a></li> 1448 1460 <li><em>Section 9.3.1</em> <a href="#rfc.xref.Part1.7">4.1</a></li> 1449 1461 </ul> 1450 1462 </li> 1451 <li><em>Part3</em> <a href="#rfc.xref.Part3.1">2.2. 2</a>, <a href="#rfc.xref.Part3.2">2.2.2</a>, <a href="#Part3"><b>8.1</b></a><ul>1452 <li><em>Section 5</em> <a href="#rfc.xref.Part3.1">2.2. 2</a></li>1453 <li><em>Section 6.3</em> <a href="#rfc.xref.Part3.2">2.2. 2</a></li>1463 <li><em>Part3</em> <a href="#rfc.xref.Part3.1">2.2.5</a>, <a href="#rfc.xref.Part3.2">2.2.5</a>, <a href="#Part3"><b>8.1</b></a><ul> 1464 <li><em>Section 5</em> <a href="#rfc.xref.Part3.1">2.2.5</a></li> 1465 <li><em>Section 6.3</em> <a href="#rfc.xref.Part3.2">2.2.5</a></li> 1454 1466 </ul> 1455 1467 </li> 1456 <li><em>Part5</em> <a href="#rfc.xref.Part5.1"> 2.2</a>, <a href="#rfc.xref.Part5.2">2.3</a>, <a href="#rfc.xref.Part5.3">2.3</a>, <a href="#rfc.xref.Part5.4">3.3</a>, <a href="#Part5"><b>8.1</b></a><ul>1457 <li><em>Section 5.3</em> <a href="#rfc.xref.Part5. 1">2.2</a></li>1458 <li><em>Section 5.4</em> <a href="#rfc.xref.Part5. 4">3.3</a></li>1468 <li><em>Part5</em> <a href="#rfc.xref.Part5.1">3.3</a>, <a href="#rfc.xref.Part5.2">3.5</a>, <a href="#Part5"><b>8.1</b></a><ul> 1469 <li><em>Section 5.3</em> <a href="#rfc.xref.Part5.2">3.5</a></li> 1470 <li><em>Section 5.4</em> <a href="#rfc.xref.Part5.1">3.3</a></li> 1459 1471 </ul> 1460 1472 </li> 1461 <li><em>Part6</em> <a href="#rfc.xref.Part6.1">1</a>, <a href="# Part6"><b>8.1</b></a></li>1473 <li><em>Part6</em> <a href="#rfc.xref.Part6.1">1</a>, <a href="#rfc.xref.Part6.2">2.1.1</a>, <a href="#rfc.xref.Part6.3">2.2.1</a>, <a href="#Part6"><b>8.1</b></a></li> 1462 1474 </ul> 1463 1475 </li>
Note: See TracChangeset
for help on using the changeset viewer.