Changeset 2389
- Timestamp:
- 14/09/13 04:36:35 (9 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p4-conditional.html
r2388 r2389 994 994 <div id="rfc.iref.i.3"></div> 995 995 <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a id="header.if-modified-since" href="#header.if-modified-since">If-Modified-Since</a></h2> 996 <p id="rfc.section.3.3.p.1">The "If-Modified-Since" header field makes the GET or HEAD request method conditional on the selected representation's modification 997 date being more recent than the date provided in the field-value: if the selected representation has not been modified since 998 the time specified in this field, then respond with a <a href="#status.304" class="smpl">304 (Not Modified)</a> status code and only send metadata that might be useful for identifying or updating a cached representation. Hence, transfer 999 of the selected representation's data is avoided if that data has not changed. 996 <p id="rfc.section.3.3.p.1">The "If-Modified-Since" header field makes a GET or HEAD request method conditional on the selected representation's modification 997 date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided 998 if that data has not changed. 1000 999 </p> 1001 1000 <div id="rfc.figure.u.12"></div><pre class="inline"><span id="rfc.iref.g.9"></span> <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = <a href="#imported.abnf" class="smpl">HTTP-date</a> … … 1008 1007 neither GET nor HEAD. 1009 1008 </p> 1010 <p id="rfc.section.3.3.p.7">A recipient <em class="bcp14">MUST</em> interpret an If-Modified-Since field-value's timestamp in terms of the origin server's clock. A recipient cache that evaluates 1011 this precondition <em class="bcp14">SHOULD</em> make its comparisons with respect to a stored <a href="#header.last-modified" class="smpl">Last-Modified</a> or <a href="p2-semantics.html#header.date" class="smpl">Date</a> header field, when available in a prior response from that origin server, rather than comparing it to a timestamp generated 1012 by its own clock. 1009 <p id="rfc.section.3.3.p.7">A recipient <em class="bcp14">MUST</em> interpret an If-Modified-Since field-value's timestamp in terms of the origin server's clock. 1013 1010 </p> 1014 1011 <p id="rfc.section.3.3.p.8">If-Modified-Since is typically used for two distinct purposes: 1) to allow efficient updates of a cached representation that … … 1025 1022 selected representation's <a href="#header.last-modified" class="smpl">Last-Modified</a> field will not be able to help the user agent limit its data transfers to only those changed during the specified window. 1026 1023 </p> 1024 <p id="rfc.section.3.3.p.11">An origin server that receives an If-Modified-Since header field <em class="bcp14">SHOULD</em> evaluate the condition prior to performing the method (<a href="#evaluation" title="Evaluation">Section 5</a>). The origin server <em class="bcp14">SHOULD NOT</em> perform the requested method if the selected representation's last modification date is earlier than or equal to the date 1025 provided in the field-value; instead, the origin server <em class="bcp14">SHOULD</em> generate a <a href="#status.304" class="smpl">304 (Not Modified)</a> response, including only those metadata that are useful for identifying or updating a previously cached response. 1026 </p> 1027 1027 <div id="rfc.iref.i.4"></div> 1028 1028 <h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> <a id="header.if-unmodified-since" href="#header.if-unmodified-since">If-Unmodified-Since</a></h2> … … 1044 1044 (i.e., to prevent the "lost update" problem). It can also be used with safe methods to abort a request if the <a href="p2-semantics.html#representations" class="smpl">selected representation</a> does not match one already stored (or partially stored) from a prior request. 1045 1045 </p> 1046 <p id="rfc.section.3.4.p.9">An origin server that receives an If-Unmodified-Since header field <em class="bcp14">MUST</em> evaluate the condition prior to performing the method (<a href="#evaluation" title="Evaluation">Section 5</a>). The condition is false if the selected representation's last modification date is more recent than the date provided in 1047 the field-value. 1048 </p> 1049 <p id="rfc.section.3.4.p.10">An origin server <em class="bcp14">MUST NOT</em> perform the requested method if a received If-Unmodified-Since condition evaluates to false; instead the origin server <em class="bcp14">MUST</em> respond with either: a) the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code; or, b) one of the <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> status codes if the origin server has verified that a state change is being requested and the final state is already reflected 1046 <p id="rfc.section.3.4.p.9">An origin server that receives an If-Unmodified-Since header field <em class="bcp14">MUST</em> evaluate the condition prior to performing the method (<a href="#evaluation" title="Evaluation">Section 5</a>). The origin server <em class="bcp14">MUST NOT</em> perform the requested method if the selected representation's last modification date is more recent than the date provided 1047 in the field-value; instead the origin server <em class="bcp14">MUST</em> respond with either: a) the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code; or, b) one of the <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> status codes if the origin server has verified that a state change is being requested and the final state is already reflected 1050 1048 in the current state of the target resource (i.e., the change requested by the user agent has already succeeded, but the user 1051 1049 agent might not be aware of that because the prior response message was lost or a compatible change was made by some other -
draft-ietf-httpbis/latest/p4-conditional.xml
r2388 r2389 793 793 <x:anchor-alias value="If-Modified-Since"/> 794 794 <t> 795 The "If-Modified-Since" header field makes theGET or HEAD request method795 The "If-Modified-Since" header field makes a GET or HEAD request method 796 796 conditional on the selected representation's modification date being more 797 recent than the date provided in the field-value: if the selected representation 798 has not been modified since the time specified in this field, then respond 799 with a <x:ref>304 (Not Modified)</x:ref> status code and only send 800 metadata that might be useful for identifying or updating a cached 801 representation. Hence, transfer of the selected representation's data is 802 avoided if that data has not changed. 797 recent than the date provided in the field-value. Transfer of the selected 798 representation's data is avoided if that data has not changed. 803 799 </t> 804 800 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Modified-Since"/> … … 826 822 <t> 827 823 A recipient &MUST; interpret an If-Modified-Since field-value's timestamp 828 in terms of the origin server's clock. A recipient cache that evaluates 829 this precondition &SHOULD; make its comparisons with 830 respect to a stored <x:ref>Last-Modified</x:ref> or <x:ref>Date</x:ref> 831 header field, when available in a prior response from that origin server, 832 rather than comparing it to a timestamp generated by its own clock. 824 in terms of the origin server's clock. 833 825 </t> 834 826 <t> … … 861 853 only those changed during the specified window. 862 854 </t> 855 <t> 856 An origin server that receives an If-Modified-Since header field &SHOULD; 857 evaluate the condition prior to performing the method 858 (<xref target="evaluation"/>). 859 The origin server &SHOULD-NOT; perform the requested method if the selected 860 representation's last modification date is earlier than or equal to the 861 date provided in the field-value; instead, the origin server &SHOULD; 862 generate a <x:ref>304 (Not Modified)</x:ref> response, including only those 863 metadata that are useful for identifying or updating a previously cached 864 response. 865 </t> 863 866 </section> 864 867 … … 910 913 An origin server that receives an If-Unmodified-Since header field &MUST; 911 914 evaluate the condition prior to performing the method 912 (<xref target="evaluation"/>). The condition is false if the selected 915 (<xref target="evaluation"/>). 916 The origin server &MUST-NOT; perform the requested method if the selected 913 917 representation's last modification date is more recent than the date 914 provided in the field-value. 915 </t> 916 <t> 917 An origin server &MUST-NOT; perform the requested method if a received 918 If-Unmodified-Since condition evaluates to false; instead the 918 provided in the field-value; instead the 919 919 origin server &MUST; respond with either: 920 920 a) the <x:ref>412 (Precondition Failed)</x:ref> status code; or,
Note: See TracChangeset
for help on using the changeset viewer.