1 | <?xml version="1.0" encoding="utf-8"?> |
---|
2 | <?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?> |
---|
3 | <!DOCTYPE rfc [ |
---|
4 | <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>"> |
---|
5 | <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>"> |
---|
6 | <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>"> |
---|
7 | <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>"> |
---|
8 | <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>"> |
---|
9 | <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>"> |
---|
10 | <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>"> |
---|
11 | <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>"> |
---|
12 | <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>"> |
---|
13 | <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>"> |
---|
14 | <!ENTITY ID-VERSION "latest"> |
---|
15 | <!ENTITY ID-MONTH "July"> |
---|
16 | <!ENTITY ID-YEAR "2010"> |
---|
17 | <!ENTITY notation "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
18 | <!ENTITY notation-abnf "<xref target='Part1' x:rel='#notation.abnf' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
19 | <!ENTITY basic-rules "<xref target='Part1' x:rel='#basic.rules' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
20 | <!ENTITY header-date "<xref target='Part1' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
21 | <!ENTITY messaging "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
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'/>"> |
---|
24 | <!ENTITY header-if-range "<xref target='Part5' x:rel='#header.if-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
25 | <!ENTITY header-range "<xref target='Part5' x:rel='#header.range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
26 | <!ENTITY header-vary "<xref target='Part6' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
27 | <!ENTITY clockless "<xref target='Part1' x:rel='#clockless.origin.server.operation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
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'/>"> |
---|
31 | ]> |
---|
32 | <?rfc toc="yes" ?> |
---|
33 | <?rfc symrefs="yes" ?> |
---|
34 | <?rfc sortrefs="yes" ?> |
---|
35 | <?rfc compact="yes"?> |
---|
36 | <?rfc subcompact="no" ?> |
---|
37 | <?rfc linkmailto="no" ?> |
---|
38 | <?rfc editing="no" ?> |
---|
39 | <?rfc comments="yes"?> |
---|
40 | <?rfc inline="yes"?> |
---|
41 | <?rfc rfcedstyle="yes"?> |
---|
42 | <?rfc-ext allow-markup-in-artwork="yes" ?> |
---|
43 | <?rfc-ext include-references-in-index="yes" ?> |
---|
44 | <rfc obsoletes="2616" category="std" x:maturity-level="draft" |
---|
45 | ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p4-conditional-&ID-VERSION;" |
---|
46 | xmlns:x='http://purl.org/net/xml2rfc/ext'> |
---|
47 | <front> |
---|
48 | |
---|
49 | <title abbrev="HTTP/1.1, Part 4">HTTP/1.1, part 4: Conditional Requests</title> |
---|
50 | |
---|
51 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
52 | <organization abbrev="Day Software">Day Software</organization> |
---|
53 | <address> |
---|
54 | <postal> |
---|
55 | <street>23 Corporate Plaza DR, Suite 280</street> |
---|
56 | <city>Newport Beach</city> |
---|
57 | <region>CA</region> |
---|
58 | <code>92660</code> |
---|
59 | <country>USA</country> |
---|
60 | </postal> |
---|
61 | <phone>+1-949-706-5300</phone> |
---|
62 | <facsimile>+1-949-706-5305</facsimile> |
---|
63 | <email>fielding@gbiv.com</email> |
---|
64 | <uri>http://roy.gbiv.com/</uri> |
---|
65 | </address> |
---|
66 | </author> |
---|
67 | |
---|
68 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
69 | <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization> |
---|
70 | <address> |
---|
71 | <postal> |
---|
72 | <street>21 Oak Knoll Road</street> |
---|
73 | <city>Carlisle</city> |
---|
74 | <region>MA</region> |
---|
75 | <code>01741</code> |
---|
76 | <country>USA</country> |
---|
77 | </postal> |
---|
78 | <email>jg@freedesktop.org</email> |
---|
79 | <uri>http://gettys.wordpress.com/</uri> |
---|
80 | </address> |
---|
81 | </author> |
---|
82 | |
---|
83 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
84 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
85 | <address> |
---|
86 | <postal> |
---|
87 | <street>HP Labs, Large Scale Systems Group</street> |
---|
88 | <street>1501 Page Mill Road, MS 1177</street> |
---|
89 | <city>Palo Alto</city> |
---|
90 | <region>CA</region> |
---|
91 | <code>94304</code> |
---|
92 | <country>USA</country> |
---|
93 | </postal> |
---|
94 | <email>JeffMogul@acm.org</email> |
---|
95 | </address> |
---|
96 | </author> |
---|
97 | |
---|
98 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
99 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
100 | <address> |
---|
101 | <postal> |
---|
102 | <street>1 Microsoft Way</street> |
---|
103 | <city>Redmond</city> |
---|
104 | <region>WA</region> |
---|
105 | <code>98052</code> |
---|
106 | <country>USA</country> |
---|
107 | </postal> |
---|
108 | <email>henrikn@microsoft.com</email> |
---|
109 | </address> |
---|
110 | </author> |
---|
111 | |
---|
112 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
113 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
114 | <address> |
---|
115 | <postal> |
---|
116 | <street>345 Park Ave</street> |
---|
117 | <city>San Jose</city> |
---|
118 | <region>CA</region> |
---|
119 | <code>95110</code> |
---|
120 | <country>USA</country> |
---|
121 | </postal> |
---|
122 | <email>LMM@acm.org</email> |
---|
123 | <uri>http://larry.masinter.net/</uri> |
---|
124 | </address> |
---|
125 | </author> |
---|
126 | |
---|
127 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
128 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
129 | <address> |
---|
130 | <postal> |
---|
131 | <street>1 Microsoft Way</street> |
---|
132 | <city>Redmond</city> |
---|
133 | <region>WA</region> |
---|
134 | <code>98052</code> |
---|
135 | </postal> |
---|
136 | <email>paulle@microsoft.com</email> |
---|
137 | </address> |
---|
138 | </author> |
---|
139 | |
---|
140 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
141 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
142 | <address> |
---|
143 | <postal> |
---|
144 | <street>MIT Computer Science and Artificial Intelligence Laboratory</street> |
---|
145 | <street>The Stata Center, Building 32</street> |
---|
146 | <street>32 Vassar Street</street> |
---|
147 | <city>Cambridge</city> |
---|
148 | <region>MA</region> |
---|
149 | <code>02139</code> |
---|
150 | <country>USA</country> |
---|
151 | </postal> |
---|
152 | <email>timbl@w3.org</email> |
---|
153 | <uri>http://www.w3.org/People/Berners-Lee/</uri> |
---|
154 | </address> |
---|
155 | </author> |
---|
156 | |
---|
157 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
158 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
159 | <address> |
---|
160 | <postal> |
---|
161 | <street>W3C / ERCIM</street> |
---|
162 | <street>2004, rte des Lucioles</street> |
---|
163 | <city>Sophia-Antipolis</city> |
---|
164 | <region>AM</region> |
---|
165 | <code>06902</code> |
---|
166 | <country>France</country> |
---|
167 | </postal> |
---|
168 | <email>ylafon@w3.org</email> |
---|
169 | <uri>http://www.raubacapeu.net/people/yves/</uri> |
---|
170 | </address> |
---|
171 | </author> |
---|
172 | |
---|
173 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
174 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
175 | <address> |
---|
176 | <postal> |
---|
177 | <street>Hafenweg 16</street> |
---|
178 | <city>Muenster</city><region>NW</region><code>48155</code> |
---|
179 | <country>Germany</country> |
---|
180 | </postal> |
---|
181 | <phone>+49 251 2807760</phone> |
---|
182 | <facsimile>+49 251 2807761</facsimile> |
---|
183 | <email>julian.reschke@greenbytes.de</email> |
---|
184 | <uri>http://greenbytes.de/tech/webdav/</uri> |
---|
185 | </address> |
---|
186 | </author> |
---|
187 | |
---|
188 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
189 | <workgroup>HTTPbis Working Group</workgroup> |
---|
190 | |
---|
191 | <abstract> |
---|
192 | <t> |
---|
193 | The Hypertext Transfer Protocol (HTTP) is an application-level |
---|
194 | protocol for distributed, collaborative, hypermedia information |
---|
195 | systems. HTTP has been in use by the World Wide Web global information |
---|
196 | initiative since 1990. This document is Part 4 of the seven-part specification |
---|
197 | that defines the protocol referred to as "HTTP/1.1" and, taken together, |
---|
198 | obsoletes RFC 2616. Part 4 defines request header fields for |
---|
199 | indicating conditional requests and the rules for constructing responses |
---|
200 | to those requests. |
---|
201 | </t> |
---|
202 | </abstract> |
---|
203 | |
---|
204 | <note title="Editorial Note (To be removed by RFC Editor)"> |
---|
205 | <t> |
---|
206 | Discussion of this draft should take place on the HTTPBIS working group |
---|
207 | mailing list (ietf-http-wg@w3.org). The current issues list is |
---|
208 | at <eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> |
---|
209 | and related documents (including fancy diffs) can be found at |
---|
210 | <eref target="http://tools.ietf.org/wg/httpbis/"/>. |
---|
211 | </t> |
---|
212 | <t> |
---|
213 | The changes in this draft are summarized in <xref target="changes.since.10"/>. |
---|
214 | </t> |
---|
215 | </note> |
---|
216 | </front> |
---|
217 | <middle> |
---|
218 | <section title="Introduction" anchor="introduction"> |
---|
219 | <t> |
---|
220 | This document defines HTTP/1.1 response metadata for indicating potential |
---|
221 | changes to payload content, including modification time stamps and opaque |
---|
222 | entity-tags, and the HTTP conditional request mechanisms that allow |
---|
223 | preconditions to be placed on a request method. Conditional GET requests |
---|
224 | allow for efficient cache updates. Other conditional request methods are |
---|
225 | used to protect against overwriting or misunderstanding the state of a |
---|
226 | resource that has been changed unbeknownst to the requesting client. |
---|
227 | </t> |
---|
228 | <t> |
---|
229 | This document is currently disorganized in order to minimize the changes |
---|
230 | between drafts and enable reviewers to see the smaller errata changes. |
---|
231 | The next draft will reorganize the sections to better reflect the content. |
---|
232 | In particular, the sections on resource metadata will be discussed first |
---|
233 | and then followed by each conditional request-header, concluding with a |
---|
234 | definition of precedence and the expectation of ordering strong validator |
---|
235 | checks before weak validator checks. It is likely that more content from |
---|
236 | &caching; will migrate to this part, where appropriate. |
---|
237 | The current mess reflects how widely dispersed these topics and associated |
---|
238 | requirements had become in <xref target="RFC2616"/>. |
---|
239 | </t> |
---|
240 | |
---|
241 | <section title="Requirements" anchor="intro.requirements"> |
---|
242 | <t> |
---|
243 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", |
---|
244 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this |
---|
245 | document are to be interpreted as described in <xref target="RFC2119"/>. |
---|
246 | </t> |
---|
247 | <t> |
---|
248 | An implementation is not compliant if it fails to satisfy one or more |
---|
249 | of the "MUST" or "REQUIRED" level requirements for the protocols it |
---|
250 | implements. An implementation that satisfies all the "MUST" or "REQUIRED" |
---|
251 | level and all the "SHOULD" level requirements for its protocols is said |
---|
252 | to be "unconditionally compliant"; one that satisfies all the "MUST" |
---|
253 | level requirements but not all the "SHOULD" level requirements for its |
---|
254 | protocols is said to be "conditionally compliant". |
---|
255 | </t> |
---|
256 | </section> |
---|
257 | |
---|
258 | <section title="Syntax Notation" anchor="notation"> |
---|
259 | <x:anchor-alias value="ALPHA"/> |
---|
260 | <x:anchor-alias value="CR"/> |
---|
261 | <x:anchor-alias value="DIGIT"/> |
---|
262 | <x:anchor-alias value="LF"/> |
---|
263 | <x:anchor-alias value="OCTET"/> |
---|
264 | <x:anchor-alias value="VCHAR"/> |
---|
265 | <x:anchor-alias value="WSP"/> |
---|
266 | <t> |
---|
267 | This specification uses the ABNF syntax defined in ¬ation; (which |
---|
268 | extends the syntax defined in <xref target="RFC5234"/> with a list rule). |
---|
269 | <xref target="collected.abnf"/> shows the collected ABNF, with the list |
---|
270 | rule expanded. |
---|
271 | </t> |
---|
272 | <t> |
---|
273 | The following core rules are included by |
---|
274 | reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>: |
---|
275 | ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), |
---|
276 | DIGIT (decimal 0-9), DQUOTE (double quote), |
---|
277 | HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), |
---|
278 | OCTET (any 8-bit sequence of data), SP (space), |
---|
279 | VCHAR (any visible USASCII character), |
---|
280 | and WSP (whitespace). |
---|
281 | </t> |
---|
282 | |
---|
283 | <section title="Core Rules" anchor="core.rules"> |
---|
284 | <x:anchor-alias value="quoted-string"/> |
---|
285 | <x:anchor-alias value="OWS"/> |
---|
286 | <t> |
---|
287 | The core rules below are defined in &basic-rules;: |
---|
288 | </t> |
---|
289 | <figure><artwork type="abnf2616"> |
---|
290 | <x:ref>quoted-string</x:ref> = <quoted-string, defined in &basic-rules;> |
---|
291 | <x:ref>OWS</x:ref> = <OWS, defined in &basic-rules;> |
---|
292 | </artwork></figure> |
---|
293 | </section> |
---|
294 | |
---|
295 | <section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies"> |
---|
296 | <x:anchor-alias value="HTTP-date"/> |
---|
297 | <t> |
---|
298 | The ABNF rules below are defined in other parts: |
---|
299 | </t> |
---|
300 | <figure><!--Part1--><artwork type="abnf2616"> |
---|
301 | <x:ref>HTTP-date</x:ref> = <HTTP-date, defined in &full-date;> |
---|
302 | </artwork></figure> |
---|
303 | </section> |
---|
304 | |
---|
305 | </section> |
---|
306 | |
---|
307 | </section> |
---|
308 | |
---|
309 | <section title="Entity-Tags" anchor="entity.tags"> |
---|
310 | <x:anchor-alias value="entity-tag"/> |
---|
311 | <x:anchor-alias value="opaque-tag"/> |
---|
312 | <x:anchor-alias value="weak"/> |
---|
313 | <t> |
---|
314 | Entity-tags are used for comparing two or more representations from the same |
---|
315 | requested resource. HTTP/1.1 uses entity-tags in the ETag (<xref target="header.etag"/>), |
---|
316 | If-Match (<xref target="header.if-match"/>), If-None-Match (<xref target="header.if-none-match"/>), and |
---|
317 | If-Range (&header-if-range;) header fields. The definition of how they |
---|
318 | are used and compared as cache validators is in <xref target="weak.and.strong.validators"/>. An |
---|
319 | entity-tag consists of an opaque quoted string, possibly prefixed by |
---|
320 | a weakness indicator. |
---|
321 | </t> |
---|
322 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="entity-tag"/><iref primary="true" item="Grammar" subitem="weak"/><iref primary="true" item="Grammar" subitem="opaque-tag"/> |
---|
323 | <x:ref>entity-tag</x:ref> = [ <x:ref>weak</x:ref> ] <x:ref>opaque-tag</x:ref> |
---|
324 | <x:ref>weak</x:ref> = <x:abnf-char-sequence>"W/"</x:abnf-char-sequence> ; "W/", case-sensitive |
---|
325 | <x:ref>opaque-tag</x:ref> = <x:ref>quoted-string</x:ref> |
---|
326 | </artwork></figure> |
---|
327 | <t> |
---|
328 | A "strong entity-tag" &MAY; be shared by two representations of a resource |
---|
329 | only if they are equivalent by octet equality. |
---|
330 | </t> |
---|
331 | <t> |
---|
332 | A "weak entity-tag", indicated by the "W/" prefix, &MAY; be shared by |
---|
333 | two representations of a resource only if the representations are equivalent and |
---|
334 | could be substituted for each other with no significant change in |
---|
335 | semantics. A weak entity-tag can only be used for weak comparison. |
---|
336 | </t> |
---|
337 | <t> |
---|
338 | An entity-tag &MUST; be unique across all versions of all representations |
---|
339 | associated with a particular resource. A given entity-tag value &MAY; |
---|
340 | be used for representations obtained by requests on different URIs. The use |
---|
341 | of the same entity-tag value in conjunction with representations obtained by |
---|
342 | requests on different URIs does not imply the equivalence of those |
---|
343 | representations. |
---|
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 might or might not use the gzip content coding. |
---|
360 | If it does not, the response might look like: |
---|
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 | An alternative representation 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 representation, |
---|
392 | so therefore an entity-tag of an encoded representation must be distinct |
---|
393 | from an unencoded representation to prevent conflicts during cache updates |
---|
394 | and range requests. In contrast, transfer codings (&transfer-codings;) |
---|
395 | apply only during message transfer and do not require distinct entity-tags. |
---|
396 | </t> |
---|
397 | </x:note> |
---|
398 | </section> |
---|
399 | </section> |
---|
400 | |
---|
401 | <section title="Status Code Definitions" anchor="status.code.definitions"> |
---|
402 | <section title="304 Not Modified" anchor="status.304"> |
---|
403 | <iref primary="true" item="304 Not Modified (status code)" x:for-anchor=""/> |
---|
404 | <iref primary="true" item="Status Codes" subitem="304 Not Modified" x:for-anchor=""/> |
---|
405 | <t> |
---|
406 | If the client has performed a conditional GET request and access is |
---|
407 | allowed, but the document has not been modified, the server &SHOULD; |
---|
408 | respond with this status code. The 304 response &MUST-NOT; contain a |
---|
409 | message-body, and thus is always terminated by the first empty line |
---|
410 | after the header fields. |
---|
411 | </t> |
---|
412 | <t> |
---|
413 | A 304 response &MUST; include a Date header field (&header-date;) |
---|
414 | unless its omission is required by &clockless;. If a 200 response |
---|
415 | to the same request would have included any of the header fields |
---|
416 | Cache-Control, Content-Location, ETag, Expires, Last-Modified, or |
---|
417 | Vary, then those same header fields &MUST; be sent in a 304 response. |
---|
418 | </t> |
---|
419 | <t> |
---|
420 | Since the goal of a 304 response is to minimize information transfer |
---|
421 | when the recipient already has one or more cached representations, |
---|
422 | the response &SHOULD-NOT; include representation metadata other |
---|
423 | than the above listed fields unless said metadata exists for the |
---|
424 | purpose of guiding cache updates (e.g., future HTTP extensions). |
---|
425 | </t> |
---|
426 | <t> |
---|
427 | If a 304 response includes an entity-tag that indicates a |
---|
428 | representation not currently cached, then the recipient &MUST-NOT; |
---|
429 | use the 304 to update its own cache. If that conditional request originated |
---|
430 | with an outbound client, such as a user agent with its own cache sending a |
---|
431 | conditional GET to a shared proxy, then the 304 response &MUST; be |
---|
432 | forwarded to the outbound client. Otherwise, disregard the response |
---|
433 | and repeat the request without the conditional. |
---|
434 | </t> |
---|
435 | <t> |
---|
436 | If a cache uses a received 304 response to update a cache entry, the |
---|
437 | cache &MUST; update the entry to reflect any new field values given in |
---|
438 | the response. |
---|
439 | </t> |
---|
440 | </section> |
---|
441 | |
---|
442 | <section title="412 Precondition Failed" anchor="status.412"> |
---|
443 | <iref primary="true" item="412 Precondition Failed (status code)" x:for-anchor=""/> |
---|
444 | <iref primary="true" item="Status Codes" subitem="412 Precondition Failed" x:for-anchor=""/> |
---|
445 | <t> |
---|
446 | The precondition given in one or more of the request-header fields |
---|
447 | evaluated to false when it was tested on the server. This response |
---|
448 | code allows the client to place preconditions on the current resource |
---|
449 | metadata (header field data) and thus prevent the requested |
---|
450 | method from being applied to a resource other than the one intended. |
---|
451 | </t> |
---|
452 | </section> |
---|
453 | </section> |
---|
454 | |
---|
455 | <section title="Weak and Strong Validators" anchor="weak.and.strong.validators"> |
---|
456 | <t> |
---|
457 | Since both origin servers and caches will compare two validators to |
---|
458 | decide if they represent the same or different representations, one normally |
---|
459 | would expect that if the representation (including both representation |
---|
460 | header fields and representation body) changes in any way, then the |
---|
461 | associated validator would change as well. If this is true, then we |
---|
462 | call this validator a "strong validator". |
---|
463 | </t> |
---|
464 | <t> |
---|
465 | However, there might be cases when a server prefers to change the |
---|
466 | validator only on semantically significant changes, and not when |
---|
467 | insignificant aspects of the representation change. A validator that does not |
---|
468 | always change when the representation changes is a "weak validator". |
---|
469 | </t> |
---|
470 | <t> |
---|
471 | An entity-tag is normally a strong validator, but the protocol |
---|
472 | provides a mechanism to tag an entity-tag as "weak". One can think of |
---|
473 | a strong validator as one that changes whenever the sequence of bits |
---|
474 | in a representation changes, while a weak value changes whenever the |
---|
475 | meaning of a representation changes. Alternatively, one can think of |
---|
476 | a strong validator as part of an identifier for a specific representation, |
---|
477 | whereas a weak validator is part of an identifier for a set of semantically |
---|
478 | equivalent representations. |
---|
479 | <list><t> |
---|
480 | <x:h>Note:</x:h> One example of a strong validator is an integer that is |
---|
481 | incremented in stable storage every time a representation is changed. |
---|
482 | </t><t> |
---|
483 | A representation's modification time, if defined with only one-second |
---|
484 | resolution, could be a weak validator, since it is possible that |
---|
485 | the representation might be modified twice during a single second. |
---|
486 | </t><t> |
---|
487 | Support for weak validators is optional. However, weak validators |
---|
488 | allow for more efficient caching of equivalent objects; for |
---|
489 | example, a hit counter on a site is probably good enough if it is |
---|
490 | updated every few days or weeks, and any value during that period |
---|
491 | is likely "good enough" to be equivalent. |
---|
492 | </t></list> |
---|
493 | </t> |
---|
494 | <t> |
---|
495 | A "use" of a validator is either when a client generates a request |
---|
496 | and includes the validator in a validating header field, or when a |
---|
497 | server compares two validators. |
---|
498 | </t> |
---|
499 | <t> |
---|
500 | Strong validators are usable in any context. Weak validators are only |
---|
501 | usable in contexts that do not depend on exact equality of a representation. |
---|
502 | For example, either kind is usable for a normal conditional GET. |
---|
503 | However, only a strong validator is usable for a sub-range |
---|
504 | retrieval, since otherwise the client might end up with an internally |
---|
505 | inconsistent representation. |
---|
506 | </t> |
---|
507 | <t> |
---|
508 | Clients &MUST-NOT; use weak validators in range requests (<xref target="Part5"/>). |
---|
509 | </t> |
---|
510 | <t> |
---|
511 | The only function that HTTP/1.1 defines on validators is |
---|
512 | comparison. There are two validator comparison functions, depending |
---|
513 | on whether the comparison context allows the use of weak validators |
---|
514 | or not: |
---|
515 | <list style="symbols"> |
---|
516 | <t>The strong comparison function: in order to be considered equal, |
---|
517 | both opaque-tags &MUST; be identical character-by-character, and both |
---|
518 | &MUST-NOT; be weak.</t> |
---|
519 | <t>The weak comparison function: in order to be considered equal, both |
---|
520 | opaque-tags &MUST; be identical character-by-character, but |
---|
521 | either or both of them &MAY; be tagged as "weak" without affecting |
---|
522 | the result.</t> |
---|
523 | </list> |
---|
524 | </t> |
---|
525 | <t> |
---|
526 | The example below shows the results for a set of entity-tag pairs, |
---|
527 | and both the weak and strong comparison function results: |
---|
528 | </t> |
---|
529 | <texttable align="left"> |
---|
530 | <ttcol>ETag 1</ttcol> |
---|
531 | <ttcol>ETag 2</ttcol> |
---|
532 | <ttcol>Strong Comparison</ttcol> |
---|
533 | <ttcol>Weak Comparison</ttcol> |
---|
534 | |
---|
535 | <c>W/"1"</c> |
---|
536 | <c>W/"1"</c> |
---|
537 | <c>no match</c> |
---|
538 | <c>match</c> |
---|
539 | |
---|
540 | <c>W/"1"</c> |
---|
541 | <c>W/"2"</c> |
---|
542 | <c>no match</c> |
---|
543 | <c>no match</c> |
---|
544 | |
---|
545 | <c>W/"1"</c> |
---|
546 | <c>"1"</c> |
---|
547 | <c>no match</c> |
---|
548 | <c>match</c> |
---|
549 | |
---|
550 | <c>"1"</c> |
---|
551 | <c>"1"</c> |
---|
552 | <c>match</c> |
---|
553 | <c>match</c> |
---|
554 | </texttable> |
---|
555 | <t> |
---|
556 | An entity-tag is strong unless it is explicitly tagged as weak. |
---|
557 | <xref target="entity.tags"/> gives the syntax for entity-tags. |
---|
558 | </t> |
---|
559 | <t> |
---|
560 | A Last-Modified time, when used as a validator in a request, is |
---|
561 | implicitly weak unless it is possible to deduce that it is strong, |
---|
562 | using the following rules: |
---|
563 | <list style="symbols"> |
---|
564 | <t>The validator is being compared by an origin server to the |
---|
565 | actual current validator for the representation and,</t> |
---|
566 | <t>That origin server reliably knows that the associated representation did |
---|
567 | not change twice during the second covered by the presented |
---|
568 | validator.</t> |
---|
569 | </list> |
---|
570 | </t> |
---|
571 | <t> |
---|
572 | or |
---|
573 | <list style="symbols"> |
---|
574 | <t>The validator is about to be used by a client in an If-Modified-Since |
---|
575 | or If-Unmodified-Since header, because the client |
---|
576 | has a cache entry for the associated representation, and</t> |
---|
577 | <t>That cache entry includes a Date value, which gives the time |
---|
578 | when the origin server sent the original response, and</t> |
---|
579 | <t>The presented Last-Modified time is at least 60 seconds before |
---|
580 | the Date value.</t> |
---|
581 | </list> |
---|
582 | </t> |
---|
583 | <t> |
---|
584 | or |
---|
585 | <list style="symbols"> |
---|
586 | <t>The validator is being compared by an intermediate cache to the |
---|
587 | validator stored in its cache entry for the representation, and</t> |
---|
588 | <t>That cache entry includes a Date value, which gives the time |
---|
589 | when the origin server sent the original response, and</t> |
---|
590 | <t>The presented Last-Modified time is at least 60 seconds before |
---|
591 | the Date value.</t> |
---|
592 | </list> |
---|
593 | </t> |
---|
594 | <t> |
---|
595 | This method relies on the fact that if two different responses were |
---|
596 | sent by the origin server during the same second, but both had the |
---|
597 | same Last-Modified time, then at least one of those responses would |
---|
598 | have a Date value equal to its Last-Modified time. The arbitrary 60-second |
---|
599 | limit guards against the possibility that the Date and Last-Modified |
---|
600 | values are generated from different clocks, or at somewhat |
---|
601 | different times during the preparation of the response. An |
---|
602 | implementation &MAY; use a value larger than 60 seconds, if it is |
---|
603 | believed that 60 seconds is too short. |
---|
604 | </t> |
---|
605 | <t> |
---|
606 | If a client wishes to perform a sub-range retrieval on a value for |
---|
607 | which it has only a Last-Modified time and no opaque validator, it |
---|
608 | &MAY; do this only if the Last-Modified time is strong in the sense |
---|
609 | described here. |
---|
610 | </t> |
---|
611 | <t> |
---|
612 | A cache or origin server receiving a conditional range request |
---|
613 | (<xref target="Part5"/>) &MUST; use the strong comparison function to |
---|
614 | evaluate the condition. |
---|
615 | </t> |
---|
616 | <t> |
---|
617 | These rules allow HTTP/1.1 caches and clients to safely perform sub-range |
---|
618 | retrievals on values that have been obtained from HTTP/1.0 |
---|
619 | servers. |
---|
620 | </t> |
---|
621 | </section> |
---|
622 | |
---|
623 | <section title="Rules for When to Use Entity-tags and Last-Modified Dates" anchor="rules.for.when.to.use.entity.tags.and.last-modified.dates"> |
---|
624 | <t> |
---|
625 | We adopt a set of rules and recommendations for origin servers, |
---|
626 | clients, and caches regarding when various validator types ought to |
---|
627 | be used, and for what purposes. |
---|
628 | </t> |
---|
629 | <t> |
---|
630 | HTTP/1.1 origin servers: |
---|
631 | <list style="symbols"> |
---|
632 | <t>&SHOULD; send an entity-tag validator unless it is not feasible to |
---|
633 | generate one.</t> |
---|
634 | |
---|
635 | <t>&MAY; send a weak entity-tag instead of a strong entity-tag, if |
---|
636 | performance considerations support the use of weak entity-tags, |
---|
637 | or if it is unfeasible to send a strong entity-tag.</t> |
---|
638 | |
---|
639 | <t>&SHOULD; send a Last-Modified value if it is feasible to send one, |
---|
640 | unless the risk of a breakdown in semantic transparency that |
---|
641 | could result from using this date in an If-Modified-Since header |
---|
642 | would lead to serious problems.</t> |
---|
643 | </list> |
---|
644 | </t> |
---|
645 | <t> |
---|
646 | In other words, the preferred behavior for an HTTP/1.1 origin server |
---|
647 | is to send both a strong entity-tag and a Last-Modified value. |
---|
648 | </t> |
---|
649 | <t> |
---|
650 | In order to be legal, a strong entity-tag &MUST; change whenever the |
---|
651 | associated representation changes in any way. A weak entity-tag &SHOULD; |
---|
652 | change whenever the associated representation changes in a semantically |
---|
653 | significant way. |
---|
654 | </t> |
---|
655 | <x:note> |
---|
656 | <t> |
---|
657 | <x:h>Note:</x:h> In order to provide semantically transparent caching, an |
---|
658 | origin server must avoid reusing a specific strong entity-tag |
---|
659 | value for two different representations, or reusing a specific weak |
---|
660 | entity-tag value for two semantically different representations. Cache |
---|
661 | entries might persist for arbitrarily long periods, regardless of |
---|
662 | expiration times, so it might be inappropriate to expect that a |
---|
663 | cache will never again attempt to validate an entry using a |
---|
664 | validator that it obtained at some point in the past. |
---|
665 | </t> |
---|
666 | </x:note> |
---|
667 | <t> |
---|
668 | HTTP/1.1 clients: |
---|
669 | <list style="symbols"> |
---|
670 | <t>&MUST; use that entity-tag in any cache-conditional request (using |
---|
671 | If-Match or If-None-Match) if an entity-tag has been provided by the |
---|
672 | origin server.</t> |
---|
673 | |
---|
674 | <t>&SHOULD; use the Last-Modified value in non-subrange cache-conditional |
---|
675 | requests (using If-Modified-Since) if only a Last-Modified value has |
---|
676 | been provided by the origin server. </t> |
---|
677 | |
---|
678 | <t>&MAY; use the Last-Modified value in subrange cache-conditional |
---|
679 | requests (using If-Unmodified-Since) if only a Last-Modified value has |
---|
680 | been provided by an HTTP/1.0 origin server. The user agent &SHOULD; |
---|
681 | provide a way to disable this, in case of difficulty.</t> |
---|
682 | |
---|
683 | <t>&SHOULD; use both validators in cache-conditional requests if both an |
---|
684 | entity-tag and a Last-Modified value have been provided by the origin |
---|
685 | server. This allows both HTTP/1.0 and HTTP/1.1 caches to respond |
---|
686 | appropriately.</t> |
---|
687 | </list> |
---|
688 | </t> |
---|
689 | <t> |
---|
690 | An HTTP/1.1 origin server, upon receiving a conditional request that |
---|
691 | includes both a Last-Modified date (e.g., in an If-Modified-Since or |
---|
692 | If-Unmodified-Since header field) and one or more entity-tags (e.g., |
---|
693 | in an If-Match, If-None-Match, or If-Range header field) as cache |
---|
694 | validators, &MUST-NOT; return a response status of 304 (Not Modified) |
---|
695 | unless doing so is consistent with all of the conditional header |
---|
696 | fields in the request. |
---|
697 | </t> |
---|
698 | <t> |
---|
699 | An HTTP/1.1 caching proxy, upon receiving a conditional request that |
---|
700 | includes both a Last-Modified date and one or more entity-tags as |
---|
701 | cache validators, &MUST-NOT; return a locally cached response to the |
---|
702 | client unless that cached response is consistent with all of the |
---|
703 | conditional header fields in the request. |
---|
704 | <list><t> |
---|
705 | <x:h>Note:</x:h> The general principle behind these rules is that HTTP/1.1 |
---|
706 | servers and clients should transmit as much non-redundant |
---|
707 | information as is available in their responses and requests. |
---|
708 | HTTP/1.1 systems receiving this information will make the most |
---|
709 | conservative assumptions about the validators they receive. |
---|
710 | </t><t> |
---|
711 | HTTP/1.0 clients and caches will ignore entity-tags. Generally, |
---|
712 | last-modified values received or used by these systems will |
---|
713 | support transparent and efficient caching, and so HTTP/1.1 origin |
---|
714 | servers should provide Last-Modified values. In those rare cases |
---|
715 | where the use of a Last-Modified value as a validator by an |
---|
716 | HTTP/1.0 system could result in a serious problem, then HTTP/1.1 |
---|
717 | origin servers should not provide one. |
---|
718 | </t></list> |
---|
719 | </t> |
---|
720 | </section> |
---|
721 | |
---|
722 | <section title="Header Field Definitions" anchor="header.fields"> |
---|
723 | <t> |
---|
724 | This section defines the syntax and semantics of HTTP/1.1 header fields |
---|
725 | related to conditional requests. |
---|
726 | </t> |
---|
727 | <t> |
---|
728 | For entity-header fields, both sender and recipient refer to either the |
---|
729 | client or the server, depending on who sends and who receives the message. |
---|
730 | </t> |
---|
731 | |
---|
732 | <section title="ETag" anchor="header.etag"> |
---|
733 | <iref primary="true" item="ETag header" x:for-anchor=""/> |
---|
734 | <iref primary="true" item="Headers" subitem="ETag" x:for-anchor=""/> |
---|
735 | <x:anchor-alias value="ETag"/> |
---|
736 | <x:anchor-alias value="ETag-v"/> |
---|
737 | <t> |
---|
738 | The "ETag" response-header field provides the current value of the |
---|
739 | entity-tag (see <xref target="entity.tags"/>) for one representation of |
---|
740 | the resource identified by the Effective Request URI. An entity-tag |
---|
741 | is intended for use as a resource-local identifier for differentiating |
---|
742 | between representations of the same resource that vary over time or via |
---|
743 | content negotiation (see <xref target="weak.and.strong.validators"/>). |
---|
744 | </t> |
---|
745 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="ETag"/><iref primary="true" item="Grammar" subitem="ETag-v"/> |
---|
746 | <x:ref>ETag</x:ref> = "ETag" ":" <x:ref>OWS</x:ref> <x:ref>ETag-v</x:ref> |
---|
747 | <x:ref>ETag-v</x:ref> = <x:ref>entity-tag</x:ref> |
---|
748 | </artwork></figure> |
---|
749 | <figure><preamble> |
---|
750 | Examples: |
---|
751 | </preamble> |
---|
752 | <artwork type="example"> |
---|
753 | ETag: "xyzzy" |
---|
754 | ETag: W/"xyzzy" |
---|
755 | ETag: "" |
---|
756 | </artwork></figure> |
---|
757 | <t> |
---|
758 | An entity-tag provides an "opaque" cache validator that allows for |
---|
759 | more reliable validation than modification dates in situations where |
---|
760 | it is inconvenient to store modification dates, |
---|
761 | where the one-second resolution of HTTP date values is not |
---|
762 | sufficient, or where the origin server wishes to avoid certain |
---|
763 | paradoxes that might arise from the use of modification dates. |
---|
764 | </t> |
---|
765 | <t> |
---|
766 | The principle behind entity-tags is that only the service author |
---|
767 | knows the semantics of a resource well enough to select an |
---|
768 | appropriate cache validation mechanism, and the specification of any |
---|
769 | validator comparison function more complex than byte-equality would |
---|
770 | open up a can of worms. Thus, comparisons of any other headers |
---|
771 | (except Last-Modified, for compatibility with HTTP/1.0) are never |
---|
772 | used for purposes of validating a cache entry. |
---|
773 | </t> |
---|
774 | </section> |
---|
775 | |
---|
776 | <section title="If-Match" anchor="header.if-match"> |
---|
777 | <iref primary="true" item="If-Match header" x:for-anchor=""/> |
---|
778 | <iref primary="true" item="Headers" subitem="If-Match" x:for-anchor=""/> |
---|
779 | <x:anchor-alias value="If-Match"/> |
---|
780 | <x:anchor-alias value="If-Match-v"/> |
---|
781 | <t> |
---|
782 | The "If-Match" request-header field is used to make a request method |
---|
783 | conditional. A client that has one or more representations previously |
---|
784 | obtained from the resource can verify that one of those representations is |
---|
785 | current by including a list of their associated entity-tags in the |
---|
786 | If-Match header field. |
---|
787 | </t> |
---|
788 | <t> |
---|
789 | This allows efficient updates of cached information with a minimum amount of |
---|
790 | transaction overhead. It is also used when updating resources, to prevent |
---|
791 | inadvertent modification of the wrong version of a resource. As a special |
---|
792 | case, the value "*" matches any current representation of the resource. |
---|
793 | </t> |
---|
794 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Match"/><iref primary="true" item="Grammar" subitem="If-Match-v"/> |
---|
795 | <x:ref>If-Match</x:ref> = "If-Match" ":" <x:ref>OWS</x:ref> <x:ref>If-Match-v</x:ref> |
---|
796 | <x:ref>If-Match-v</x:ref> = "*" / 1#<x:ref>entity-tag</x:ref> |
---|
797 | </artwork></figure> |
---|
798 | <t> |
---|
799 | If any of the entity-tags match the entity-tag of the representation that |
---|
800 | would have been returned in the response to a similar GET request |
---|
801 | (without the If-Match header) on that resource, or if "*" is given |
---|
802 | and any current representation exists for that resource, then the server &MAY; |
---|
803 | perform the requested method as if the If-Match header field did not |
---|
804 | exist. |
---|
805 | </t> |
---|
806 | <t> |
---|
807 | If none of the entity-tags match, or if "*" is given and no current |
---|
808 | representation exists, the server &MUST-NOT; perform the requested method, and |
---|
809 | &MUST; return a 412 (Precondition Failed) response. This behavior is |
---|
810 | most useful when the client wants to prevent an updating method, such |
---|
811 | as PUT, from modifying a resource that has changed since the client |
---|
812 | last retrieved it. |
---|
813 | </t> |
---|
814 | <t> |
---|
815 | If the request would, without the If-Match header field, result in |
---|
816 | anything other than a 2xx or 412 status, then the If-Match header |
---|
817 | &MUST; be ignored. |
---|
818 | </t> |
---|
819 | <t> |
---|
820 | The meaning of "If-Match: *" is that the method &SHOULD; be performed |
---|
821 | if the representation selected by the origin server (or by a cache, |
---|
822 | possibly using the Vary mechanism, see &header-vary;) exists, and |
---|
823 | &MUST-NOT; be performed if the representation does not exist. |
---|
824 | </t> |
---|
825 | <t> |
---|
826 | A request intended to update a resource (e.g., a PUT) &MAY; include an |
---|
827 | If-Match header field to signal that the request method &MUST-NOT; be |
---|
828 | applied if the representation corresponding to the If-Match value (a single |
---|
829 | entity-tag) is no longer a representation of that resource. This |
---|
830 | allows the user to indicate that they do not wish the request to be |
---|
831 | successful if the resource has been changed without their knowledge. |
---|
832 | Examples: |
---|
833 | </t> |
---|
834 | <figure><artwork type="example"> |
---|
835 | If-Match: "xyzzy" |
---|
836 | If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" |
---|
837 | If-Match: * |
---|
838 | </artwork></figure> |
---|
839 | <t> |
---|
840 | The result of a request having both an If-Match header field and |
---|
841 | either an If-None-Match or an If-Modified-Since header fields is |
---|
842 | undefined by this specification. |
---|
843 | </t> |
---|
844 | </section> |
---|
845 | |
---|
846 | <section title="If-Modified-Since" anchor="header.if-modified-since"> |
---|
847 | <iref primary="true" item="If-Modified-Since header" x:for-anchor=""/> |
---|
848 | <iref primary="true" item="Headers" subitem="If-Modified-Since" x:for-anchor=""/> |
---|
849 | <x:anchor-alias value="If-Modified-Since"/> |
---|
850 | <x:anchor-alias value="If-Modified-Since-v"/> |
---|
851 | <t> |
---|
852 | The "If-Modified-Since" request-header field is used to make a request |
---|
853 | method conditional by date: if the representation that would have been |
---|
854 | transferred in a 200 response to a GET request has not been modified since |
---|
855 | the time specified in this field, then do not perform the method; |
---|
856 | instead, respond as detailed below. |
---|
857 | </t> |
---|
858 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Modified-Since"/><iref primary="true" item="Grammar" subitem="If-Modified-Since-v"/> |
---|
859 | <x:ref>If-Modified-Since</x:ref> = "If-Modified-Since" ":" <x:ref>OWS</x:ref> |
---|
860 | <x:ref>If-Modified-Since-v</x:ref> |
---|
861 | <x:ref>If-Modified-Since-v</x:ref> = <x:ref>HTTP-date</x:ref> |
---|
862 | </artwork></figure> |
---|
863 | <t> |
---|
864 | An example of the field is: |
---|
865 | </t> |
---|
866 | <figure><artwork type="example"> |
---|
867 | If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT |
---|
868 | </artwork></figure> |
---|
869 | <t> |
---|
870 | A GET method with an If-Modified-Since header and no Range header |
---|
871 | requests that the representation be transferred only if it has |
---|
872 | been modified since the date given by the If-Modified-Since header. |
---|
873 | The algorithm for determining this includes the following cases: |
---|
874 | <list style="numbers"> |
---|
875 | <t>If the request would normally result in anything other than a |
---|
876 | 200 (OK) status, or if the passed If-Modified-Since date is |
---|
877 | invalid, the response is exactly the same as for a normal GET. |
---|
878 | A date which is later than the server's current time is |
---|
879 | invalid.</t> |
---|
880 | |
---|
881 | <t>If the representation has been modified since the If-Modified-Since |
---|
882 | date, the response is exactly the same as for a normal GET.</t> |
---|
883 | |
---|
884 | <t>If the representation has not been modified since a valid |
---|
885 | If-Modified-Since date, the server &SHOULD; return a |
---|
886 | 304 (Not Modified) response.</t> |
---|
887 | </list> |
---|
888 | </t> |
---|
889 | <t> |
---|
890 | The purpose of this feature is to allow efficient updates of cached |
---|
891 | information with a minimum amount of transaction overhead. |
---|
892 | <list><t> |
---|
893 | <x:h>Note:</x:h> The Range request-header field modifies the meaning of If-Modified-Since; |
---|
894 | see &header-range; for full details. |
---|
895 | </t><t> |
---|
896 | <x:h>Note:</x:h> If-Modified-Since times are interpreted by the server, whose |
---|
897 | clock might not be synchronized with the client. |
---|
898 | </t><t> |
---|
899 | <x:h>Note:</x:h> When handling an If-Modified-Since header field, some |
---|
900 | servers will use an exact date comparison function, rather than a |
---|
901 | less-than function, for deciding whether to send a 304 (Not |
---|
902 | Modified) response. To get best results when sending an If-Modified-Since |
---|
903 | header field for cache validation, clients are |
---|
904 | advised to use the exact date string received in a previous Last-Modified |
---|
905 | header field whenever possible. |
---|
906 | </t><t> |
---|
907 | <x:h>Note:</x:h> If a client uses an arbitrary date in the If-Modified-Since |
---|
908 | header instead of a date taken from the Last-Modified header for |
---|
909 | the same request, the client should be aware of the fact that this |
---|
910 | date is interpreted in the server's understanding of time. The |
---|
911 | client should consider unsynchronized clocks and rounding problems |
---|
912 | due to the different encodings of time between the client and |
---|
913 | server. This includes the possibility of race conditions if the |
---|
914 | document has changed between the time it was first requested and |
---|
915 | the If-Modified-Since date of a subsequent request, and the |
---|
916 | possibility of clock-skew-related problems if the If-Modified-Since |
---|
917 | date is derived from the client's clock without correction |
---|
918 | to the server's clock. Corrections for different time bases |
---|
919 | between client and server are at best approximate due to network |
---|
920 | latency. |
---|
921 | </t> |
---|
922 | </list> |
---|
923 | </t> |
---|
924 | <t> |
---|
925 | The result of a request having both an If-Modified-Since header field |
---|
926 | and either an If-Match or an If-Unmodified-Since header fields is |
---|
927 | undefined by this specification. |
---|
928 | </t> |
---|
929 | </section> |
---|
930 | |
---|
931 | <section title="If-None-Match" anchor="header.if-none-match"> |
---|
932 | <iref primary="true" item="If-None-Match header" x:for-anchor=""/> |
---|
933 | <iref primary="true" item="Headers" subitem="If-None-Match" x:for-anchor=""/> |
---|
934 | <x:anchor-alias value="If-None-Match"/> |
---|
935 | <x:anchor-alias value="If-None-Match-v"/> |
---|
936 | <t> |
---|
937 | The "If-None-Match" request-header field is used to make a request method |
---|
938 | conditional. A client that has one or more representations previously |
---|
939 | obtained from the resource can verify that none of those representations is |
---|
940 | current by including a list of their associated entity-tags in the |
---|
941 | If-None-Match header field. |
---|
942 | </t> |
---|
943 | <t> |
---|
944 | This allows efficient updates of cached information with a minimum amount of |
---|
945 | transaction overhead. It is also used to prevent a method (e.g., PUT) |
---|
946 | from inadvertently modifying an existing resource when the client |
---|
947 | believes that the resource does not exist. |
---|
948 | </t> |
---|
949 | <t> |
---|
950 | As a special case, the value "*" matches any current representation of the |
---|
951 | resource. |
---|
952 | </t> |
---|
953 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-None-Match"/><iref primary="true" item="Grammar" subitem="If-None-Match-v"/> |
---|
954 | <x:ref>If-None-Match</x:ref> = "If-None-Match" ":" <x:ref>OWS</x:ref> <x:ref>If-None-Match-v</x:ref> |
---|
955 | <x:ref>If-None-Match-v</x:ref> = "*" / 1#<x:ref>entity-tag</x:ref> |
---|
956 | </artwork></figure> |
---|
957 | <t> |
---|
958 | If any of the entity-tags match the entity-tag of the representation that |
---|
959 | would have been returned in the response to a similar GET request |
---|
960 | (without the If-None-Match header) on that resource, or if "*" is |
---|
961 | given and any current representation exists for that resource, then the |
---|
962 | server &MUST-NOT; perform the requested method, unless required to do |
---|
963 | so because the resource's modification date fails to match that |
---|
964 | supplied in an If-Modified-Since header field in the request. |
---|
965 | Instead, if the request method was GET or HEAD, the server &SHOULD; |
---|
966 | respond with a 304 (Not Modified) response, including the cache-related |
---|
967 | header fields (particularly ETag) of one of the representations that |
---|
968 | matched. For all other request methods, the server &MUST; respond with |
---|
969 | a status of 412 (Precondition Failed). |
---|
970 | </t> |
---|
971 | <t> |
---|
972 | If none of the entity-tags match, then the server &MAY; perform the |
---|
973 | requested method as if the If-None-Match header field did not exist, |
---|
974 | but &MUST; also ignore any If-Modified-Since header field(s) in the |
---|
975 | request. That is, if no entity-tags match, then the server &MUST-NOT; |
---|
976 | return a 304 (Not Modified) response. |
---|
977 | </t> |
---|
978 | <t> |
---|
979 | If the request would, without the If-None-Match header field, result |
---|
980 | in anything other than a 2xx or 304 status, then the If-None-Match |
---|
981 | header &MUST; be ignored. (See <xref target="rules.for.when.to.use.entity.tags.and.last-modified.dates"/> for a discussion of |
---|
982 | server behavior when both If-Modified-Since and If-None-Match appear |
---|
983 | in the same request.) |
---|
984 | </t> |
---|
985 | <t> |
---|
986 | The meaning of "If-None-Match: *" is that the method &MUST-NOT; be |
---|
987 | performed if the representation selected by the origin server (or by |
---|
988 | a cache, possibly using the Vary mechanism, see &header-vary;) |
---|
989 | exists, and &SHOULD; be performed if the representation does not exist. |
---|
990 | This feature is intended to be useful in preventing races between PUT |
---|
991 | operations. |
---|
992 | </t> |
---|
993 | <t> |
---|
994 | Examples: |
---|
995 | </t> |
---|
996 | <figure><artwork type="example"> |
---|
997 | If-None-Match: "xyzzy" |
---|
998 | If-None-Match: W/"xyzzy" |
---|
999 | If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" |
---|
1000 | If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz" |
---|
1001 | If-None-Match: * |
---|
1002 | </artwork></figure> |
---|
1003 | <t> |
---|
1004 | The result of a request having both an If-None-Match header field and |
---|
1005 | either an If-Match or an If-Unmodified-Since header fields is |
---|
1006 | undefined by this specification. |
---|
1007 | </t> |
---|
1008 | </section> |
---|
1009 | |
---|
1010 | <section title="If-Unmodified-Since" anchor="header.if-unmodified-since"> |
---|
1011 | <iref primary="true" item="If-Unmodified-Since header" x:for-anchor=""/> |
---|
1012 | <iref primary="true" item="Headers" subitem="If-Unmodified-Since" x:for-anchor=""/> |
---|
1013 | <x:anchor-alias value="If-Unmodified-Since"/> |
---|
1014 | <x:anchor-alias value="If-Unmodified-Since-v"/> |
---|
1015 | <t> |
---|
1016 | The "If-Unmodified-Since" request-header field is used to make a request |
---|
1017 | method conditional. If the representation that would have been transferred |
---|
1018 | in a 200 response to a GET request on the same resource has not been modified |
---|
1019 | since the time specified in this field, the server &SHOULD; perform the |
---|
1020 | requested operation as if the If-Unmodified-Since header were not |
---|
1021 | present. |
---|
1022 | </t> |
---|
1023 | <t> |
---|
1024 | If the representation has been modified since the specified time, |
---|
1025 | the server &MUST-NOT; perform the requested operation, and &MUST; return |
---|
1026 | a 412 (Precondition Failed). |
---|
1027 | </t> |
---|
1028 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/><iref primary="true" item="Grammar" subitem="If-Unmodified-Since-v"/> |
---|
1029 | <x:ref>If-Unmodified-Since</x:ref> = "If-Unmodified-Since" ":" <x:ref>OWS</x:ref> |
---|
1030 | <x:ref>If-Unmodified-Since-v</x:ref> |
---|
1031 | <x:ref>If-Unmodified-Since-v</x:ref> = <x:ref>HTTP-date</x:ref> |
---|
1032 | </artwork></figure> |
---|
1033 | <t> |
---|
1034 | An example of the field is: |
---|
1035 | </t> |
---|
1036 | <figure><artwork type="example"> |
---|
1037 | If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT |
---|
1038 | </artwork></figure> |
---|
1039 | <t> |
---|
1040 | If the request normally (i.e., without the If-Unmodified-Since |
---|
1041 | header) would result in anything other than a 2xx or 412 status, the |
---|
1042 | If-Unmodified-Since header &SHOULD; be ignored. |
---|
1043 | </t> |
---|
1044 | <t> |
---|
1045 | If the specified date is invalid, the header is ignored. |
---|
1046 | </t> |
---|
1047 | <t> |
---|
1048 | The result of a request having both an If-Unmodified-Since header |
---|
1049 | field and either an If-None-Match or an If-Modified-Since header |
---|
1050 | fields is undefined by this specification. |
---|
1051 | </t> |
---|
1052 | </section> |
---|
1053 | |
---|
1054 | <section title="Last-Modified" anchor="header.last-modified"> |
---|
1055 | <iref primary="true" item="Last-Modified header" x:for-anchor=""/> |
---|
1056 | <iref primary="true" item="Headers" subitem="Last-Modified" x:for-anchor=""/> |
---|
1057 | <x:anchor-alias value="Last-Modified"/> |
---|
1058 | <x:anchor-alias value="Last-Modified-v"/> |
---|
1059 | <t> |
---|
1060 | The "Last-Modified" entity-header field indicates the date and time at |
---|
1061 | which the origin server believes the representation was last modified. |
---|
1062 | </t> |
---|
1063 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Last-Modified"/><iref primary="true" item="Grammar" subitem="Last-Modified-v"/> |
---|
1064 | <x:ref>Last-Modified</x:ref> = "Last-Modified" ":" <x:ref>OWS</x:ref> <x:ref>Last-Modified-v</x:ref> |
---|
1065 | <x:ref>Last-Modified-v</x:ref> = <x:ref>HTTP-date</x:ref> |
---|
1066 | </artwork></figure> |
---|
1067 | <t> |
---|
1068 | An example of its use is |
---|
1069 | </t> |
---|
1070 | <figure><artwork type="example"> |
---|
1071 | Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT |
---|
1072 | </artwork></figure> |
---|
1073 | <t> |
---|
1074 | The exact meaning of this header field depends on the implementation |
---|
1075 | of the origin server and the nature of the original resource. For |
---|
1076 | files, it might be just the file system last-modified time. For |
---|
1077 | representations with dynamically included parts, it might be the most recent |
---|
1078 | of the set of last-modify times for its component parts. For database |
---|
1079 | gateways, it might be the last-update time stamp of the record. For |
---|
1080 | virtual objects, it might be the last time the internal state changed. |
---|
1081 | </t> |
---|
1082 | <t> |
---|
1083 | An origin server &MUST-NOT; send a Last-Modified date which is later |
---|
1084 | than the server's time of message origination. In such cases, where |
---|
1085 | the resource's last modification would indicate some time in the |
---|
1086 | future, the server &MUST; replace that date with the message |
---|
1087 | origination date. |
---|
1088 | </t> |
---|
1089 | <t> |
---|
1090 | An origin server &SHOULD; obtain the Last-Modified value of the representation |
---|
1091 | as close as possible to the time that it generates the Date value of |
---|
1092 | its response. This allows a recipient to make an accurate assessment |
---|
1093 | of the representation's modification time, especially if the representation changes |
---|
1094 | near the time that the response is generated. |
---|
1095 | </t> |
---|
1096 | <t> |
---|
1097 | HTTP/1.1 servers &SHOULD; send Last-Modified whenever feasible. |
---|
1098 | </t> |
---|
1099 | <t> |
---|
1100 | The Last-Modified entity-header field value is often used as a cache |
---|
1101 | validator. In simple terms, a cache entry is considered to be valid |
---|
1102 | if the representation has not been modified since the Last-Modified value. |
---|
1103 | </t> |
---|
1104 | </section> |
---|
1105 | |
---|
1106 | </section> |
---|
1107 | |
---|
1108 | <section title="IANA Considerations" anchor="IANA.considerations"> |
---|
1109 | |
---|
1110 | <section title="Status Code Registration" anchor="status.code.registration"> |
---|
1111 | <t> |
---|
1112 | The HTTP Status Code Registry located at <eref target="http://www.iana.org/assignments/http-status-codes"/> |
---|
1113 | should be updated with the registrations below: |
---|
1114 | </t> |
---|
1115 | <?BEGININC p4-conditional.iana-status-codes ?> |
---|
1116 | <!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually--> |
---|
1117 | <texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table"> |
---|
1118 | <ttcol>Value</ttcol> |
---|
1119 | <ttcol>Description</ttcol> |
---|
1120 | <ttcol>Reference</ttcol> |
---|
1121 | <c>304</c> |
---|
1122 | <c>Not Modified</c> |
---|
1123 | <c> |
---|
1124 | <xref target="status.304"/> |
---|
1125 | </c> |
---|
1126 | <c>412</c> |
---|
1127 | <c>Precondition Failed</c> |
---|
1128 | <c> |
---|
1129 | <xref target="status.412"/> |
---|
1130 | </c> |
---|
1131 | </texttable> |
---|
1132 | <!--(END)--> |
---|
1133 | <?ENDINC p4-conditional.iana-status-codes ?> |
---|
1134 | </section> |
---|
1135 | |
---|
1136 | <section title="Header Field Registration" anchor="header.field.registration"> |
---|
1137 | <t> |
---|
1138 | The Message Header Field Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> should be updated |
---|
1139 | with the permanent registrations below (see <xref target="RFC3864"/>): |
---|
1140 | </t> |
---|
1141 | <?BEGININC p4-conditional.iana-headers ?> |
---|
1142 | <!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually--> |
---|
1143 | <texttable align="left" suppress-title="true" anchor="iana.header.registration.table"> |
---|
1144 | <ttcol>Header Field Name</ttcol> |
---|
1145 | <ttcol>Protocol</ttcol> |
---|
1146 | <ttcol>Status</ttcol> |
---|
1147 | <ttcol>Reference</ttcol> |
---|
1148 | |
---|
1149 | <c>ETag</c> |
---|
1150 | <c>http</c> |
---|
1151 | <c>standard</c> |
---|
1152 | <c> |
---|
1153 | <xref target="header.etag"/> |
---|
1154 | </c> |
---|
1155 | <c>If-Match</c> |
---|
1156 | <c>http</c> |
---|
1157 | <c>standard</c> |
---|
1158 | <c> |
---|
1159 | <xref target="header.if-match"/> |
---|
1160 | </c> |
---|
1161 | <c>If-Modified-Since</c> |
---|
1162 | <c>http</c> |
---|
1163 | <c>standard</c> |
---|
1164 | <c> |
---|
1165 | <xref target="header.if-modified-since"/> |
---|
1166 | </c> |
---|
1167 | <c>If-None-Match</c> |
---|
1168 | <c>http</c> |
---|
1169 | <c>standard</c> |
---|
1170 | <c> |
---|
1171 | <xref target="header.if-none-match"/> |
---|
1172 | </c> |
---|
1173 | <c>If-Unmodified-Since</c> |
---|
1174 | <c>http</c> |
---|
1175 | <c>standard</c> |
---|
1176 | <c> |
---|
1177 | <xref target="header.if-unmodified-since"/> |
---|
1178 | </c> |
---|
1179 | <c>Last-Modified</c> |
---|
1180 | <c>http</c> |
---|
1181 | <c>standard</c> |
---|
1182 | <c> |
---|
1183 | <xref target="header.last-modified"/> |
---|
1184 | </c> |
---|
1185 | </texttable> |
---|
1186 | <!--(END)--> |
---|
1187 | <?ENDINC p4-conditional.iana-headers ?> |
---|
1188 | <t> |
---|
1189 | The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force". |
---|
1190 | </t> |
---|
1191 | </section> |
---|
1192 | </section> |
---|
1193 | |
---|
1194 | <section title="Security Considerations" anchor="security.considerations"> |
---|
1195 | <t> |
---|
1196 | No additional security considerations have been identified beyond |
---|
1197 | those applicable to HTTP in general &messaging;. |
---|
1198 | </t> |
---|
1199 | </section> |
---|
1200 | |
---|
1201 | <section title="Acknowledgments" anchor="ack"> |
---|
1202 | </section> |
---|
1203 | </middle> |
---|
1204 | <back> |
---|
1205 | |
---|
1206 | <references title="Normative References"> |
---|
1207 | |
---|
1208 | <reference anchor="Part1"> |
---|
1209 | <front> |
---|
1210 | <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title> |
---|
1211 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1212 | <organization abbrev="Day Software">Day Software</organization> |
---|
1213 | <address><email>fielding@gbiv.com</email></address> |
---|
1214 | </author> |
---|
1215 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1216 | <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization> |
---|
1217 | <address><email>jg@freedesktop.org</email></address> |
---|
1218 | </author> |
---|
1219 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1220 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1221 | <address><email>JeffMogul@acm.org</email></address> |
---|
1222 | </author> |
---|
1223 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1224 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1225 | <address><email>henrikn@microsoft.com</email></address> |
---|
1226 | </author> |
---|
1227 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1228 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1229 | <address><email>LMM@acm.org</email></address> |
---|
1230 | </author> |
---|
1231 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1232 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1233 | <address><email>paulle@microsoft.com</email></address> |
---|
1234 | </author> |
---|
1235 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1236 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1237 | <address><email>timbl@w3.org</email></address> |
---|
1238 | </author> |
---|
1239 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1240 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1241 | <address><email>ylafon@w3.org</email></address> |
---|
1242 | </author> |
---|
1243 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1244 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1245 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1246 | </author> |
---|
1247 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1248 | </front> |
---|
1249 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/> |
---|
1250 | <x:source href="p1-messaging.xml" basename="p1-messaging"/> |
---|
1251 | </reference> |
---|
1252 | |
---|
1253 | <reference anchor="Part3"> |
---|
1254 | <front> |
---|
1255 | <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title> |
---|
1256 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1257 | <organization abbrev="Day Software">Day Software</organization> |
---|
1258 | <address><email>fielding@gbiv.com</email></address> |
---|
1259 | </author> |
---|
1260 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1261 | <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization> |
---|
1262 | <address><email>jg@freedesktop.org</email></address> |
---|
1263 | </author> |
---|
1264 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1265 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1266 | <address><email>JeffMogul@acm.org</email></address> |
---|
1267 | </author> |
---|
1268 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1269 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1270 | <address><email>henrikn@microsoft.com</email></address> |
---|
1271 | </author> |
---|
1272 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1273 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1274 | <address><email>LMM@acm.org</email></address> |
---|
1275 | </author> |
---|
1276 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1277 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1278 | <address><email>paulle@microsoft.com</email></address> |
---|
1279 | </author> |
---|
1280 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1281 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1282 | <address><email>timbl@w3.org</email></address> |
---|
1283 | </author> |
---|
1284 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1285 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1286 | <address><email>ylafon@w3.org</email></address> |
---|
1287 | </author> |
---|
1288 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1289 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1290 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1291 | </author> |
---|
1292 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1293 | </front> |
---|
1294 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/> |
---|
1295 | <x:source href="p3-payload.xml" basename="p3-payload"/> |
---|
1296 | </reference> |
---|
1297 | |
---|
1298 | <reference anchor="Part5"> |
---|
1299 | <front> |
---|
1300 | <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title> |
---|
1301 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1302 | <organization abbrev="Day Software">Day Software</organization> |
---|
1303 | <address><email>fielding@gbiv.com</email></address> |
---|
1304 | </author> |
---|
1305 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1306 | <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization> |
---|
1307 | <address><email>jg@freedesktop.org</email></address> |
---|
1308 | </author> |
---|
1309 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1310 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1311 | <address><email>JeffMogul@acm.org</email></address> |
---|
1312 | </author> |
---|
1313 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1314 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1315 | <address><email>henrikn@microsoft.com</email></address> |
---|
1316 | </author> |
---|
1317 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1318 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1319 | <address><email>LMM@acm.org</email></address> |
---|
1320 | </author> |
---|
1321 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1322 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1323 | <address><email>paulle@microsoft.com</email></address> |
---|
1324 | </author> |
---|
1325 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1326 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1327 | <address><email>timbl@w3.org</email></address> |
---|
1328 | </author> |
---|
1329 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1330 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1331 | <address><email>ylafon@w3.org</email></address> |
---|
1332 | </author> |
---|
1333 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1334 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1335 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1336 | </author> |
---|
1337 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1338 | </front> |
---|
1339 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/> |
---|
1340 | <x:source href="p5-range.xml" basename="p5-range"/> |
---|
1341 | </reference> |
---|
1342 | |
---|
1343 | <reference anchor="Part6"> |
---|
1344 | <front> |
---|
1345 | <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title> |
---|
1346 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1347 | <organization abbrev="Day Software">Day Software</organization> |
---|
1348 | <address><email>fielding@gbiv.com</email></address> |
---|
1349 | </author> |
---|
1350 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1351 | <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization> |
---|
1352 | <address><email>jg@freedesktop.org</email></address> |
---|
1353 | </author> |
---|
1354 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1355 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1356 | <address><email>JeffMogul@acm.org</email></address> |
---|
1357 | </author> |
---|
1358 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1359 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1360 | <address><email>henrikn@microsoft.com</email></address> |
---|
1361 | </author> |
---|
1362 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1363 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1364 | <address><email>LMM@acm.org</email></address> |
---|
1365 | </author> |
---|
1366 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1367 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1368 | <address><email>paulle@microsoft.com</email></address> |
---|
1369 | </author> |
---|
1370 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1371 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1372 | <address><email>timbl@w3.org</email></address> |
---|
1373 | </author> |
---|
1374 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1375 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1376 | <address><email>ylafon@w3.org</email></address> |
---|
1377 | </author> |
---|
1378 | <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor"> |
---|
1379 | <address><email>mnot@mnot.net</email></address> |
---|
1380 | </author> |
---|
1381 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1382 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1383 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1384 | </author> |
---|
1385 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1386 | </front> |
---|
1387 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/> |
---|
1388 | <x:source href="p6-cache.xml" basename="p6-cache"/> |
---|
1389 | </reference> |
---|
1390 | |
---|
1391 | <reference anchor="RFC2119"> |
---|
1392 | <front> |
---|
1393 | <title>Key words for use in RFCs to Indicate Requirement Levels</title> |
---|
1394 | <author initials="S." surname="Bradner" fullname="Scott Bradner"> |
---|
1395 | <organization>Harvard University</organization> |
---|
1396 | <address><email>sob@harvard.edu</email></address> |
---|
1397 | </author> |
---|
1398 | <date month="March" year="1997"/> |
---|
1399 | </front> |
---|
1400 | <seriesInfo name="BCP" value="14"/> |
---|
1401 | <seriesInfo name="RFC" value="2119"/> |
---|
1402 | </reference> |
---|
1403 | |
---|
1404 | <reference anchor="RFC5234"> |
---|
1405 | <front> |
---|
1406 | <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title> |
---|
1407 | <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor"> |
---|
1408 | <organization>Brandenburg InternetWorking</organization> |
---|
1409 | <address> |
---|
1410 | <email>dcrocker@bbiw.net</email> |
---|
1411 | </address> |
---|
1412 | </author> |
---|
1413 | <author initials="P." surname="Overell" fullname="Paul Overell"> |
---|
1414 | <organization>THUS plc.</organization> |
---|
1415 | <address> |
---|
1416 | <email>paul.overell@thus.net</email> |
---|
1417 | </address> |
---|
1418 | </author> |
---|
1419 | <date month="January" year="2008"/> |
---|
1420 | </front> |
---|
1421 | <seriesInfo name="STD" value="68"/> |
---|
1422 | <seriesInfo name="RFC" value="5234"/> |
---|
1423 | </reference> |
---|
1424 | |
---|
1425 | </references> |
---|
1426 | |
---|
1427 | <references title="Informative References"> |
---|
1428 | |
---|
1429 | <reference anchor="RFC2616"> |
---|
1430 | <front> |
---|
1431 | <title>Hypertext Transfer Protocol -- HTTP/1.1</title> |
---|
1432 | <author initials="R." surname="Fielding" fullname="R. Fielding"> |
---|
1433 | <organization>University of California, Irvine</organization> |
---|
1434 | <address><email>fielding@ics.uci.edu</email></address> |
---|
1435 | </author> |
---|
1436 | <author initials="J." surname="Gettys" fullname="J. Gettys"> |
---|
1437 | <organization>W3C</organization> |
---|
1438 | <address><email>jg@w3.org</email></address> |
---|
1439 | </author> |
---|
1440 | <author initials="J." surname="Mogul" fullname="J. Mogul"> |
---|
1441 | <organization>Compaq Computer Corporation</organization> |
---|
1442 | <address><email>mogul@wrl.dec.com</email></address> |
---|
1443 | </author> |
---|
1444 | <author initials="H." surname="Frystyk" fullname="H. Frystyk"> |
---|
1445 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1446 | <address><email>frystyk@w3.org</email></address> |
---|
1447 | </author> |
---|
1448 | <author initials="L." surname="Masinter" fullname="L. Masinter"> |
---|
1449 | <organization>Xerox Corporation</organization> |
---|
1450 | <address><email>masinter@parc.xerox.com</email></address> |
---|
1451 | </author> |
---|
1452 | <author initials="P." surname="Leach" fullname="P. Leach"> |
---|
1453 | <organization>Microsoft Corporation</organization> |
---|
1454 | <address><email>paulle@microsoft.com</email></address> |
---|
1455 | </author> |
---|
1456 | <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee"> |
---|
1457 | <organization>W3C</organization> |
---|
1458 | <address><email>timbl@w3.org</email></address> |
---|
1459 | </author> |
---|
1460 | <date month="June" year="1999"/> |
---|
1461 | </front> |
---|
1462 | <seriesInfo name="RFC" value="2616"/> |
---|
1463 | </reference> |
---|
1464 | |
---|
1465 | <reference anchor='RFC3864'> |
---|
1466 | <front> |
---|
1467 | <title>Registration Procedures for Message Header Fields</title> |
---|
1468 | <author initials='G.' surname='Klyne' fullname='G. Klyne'> |
---|
1469 | <organization>Nine by Nine</organization> |
---|
1470 | <address><email>GK-IETF@ninebynine.org</email></address> |
---|
1471 | </author> |
---|
1472 | <author initials='M.' surname='Nottingham' fullname='M. Nottingham'> |
---|
1473 | <organization>BEA Systems</organization> |
---|
1474 | <address><email>mnot@pobox.com</email></address> |
---|
1475 | </author> |
---|
1476 | <author initials='J.' surname='Mogul' fullname='J. Mogul'> |
---|
1477 | <organization>HP Labs</organization> |
---|
1478 | <address><email>JeffMogul@acm.org</email></address> |
---|
1479 | </author> |
---|
1480 | <date year='2004' month='September' /> |
---|
1481 | </front> |
---|
1482 | <seriesInfo name='BCP' value='90' /> |
---|
1483 | <seriesInfo name='RFC' value='3864' /> |
---|
1484 | </reference> |
---|
1485 | |
---|
1486 | </references> |
---|
1487 | |
---|
1488 | <section title="Changes from RFC 2616" anchor="changes.from.rfc.2616"> |
---|
1489 | <t> |
---|
1490 | Allow weak entity-tags in all requests except range requests (Sections |
---|
1491 | <xref target="weak.and.strong.validators" format="counter"/> and |
---|
1492 | <xref target="header.if-none-match" format="counter"/>). |
---|
1493 | </t> |
---|
1494 | </section> |
---|
1495 | |
---|
1496 | <?BEGININC p4-conditional.abnf-appendix ?> |
---|
1497 | <section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf"> |
---|
1498 | <figure> |
---|
1499 | <artwork type="abnf" name="p4-conditional.parsed-abnf"> |
---|
1500 | <x:ref>ETag</x:ref> = "ETag:" OWS ETag-v |
---|
1501 | <x:ref>ETag-v</x:ref> = entity-tag |
---|
1502 | |
---|
1503 | <x:ref>HTTP-date</x:ref> = <HTTP-date, defined in [Part1], Section 6.1> |
---|
1504 | |
---|
1505 | <x:ref>If-Match</x:ref> = "If-Match:" OWS If-Match-v |
---|
1506 | <x:ref>If-Match-v</x:ref> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS |
---|
1507 | entity-tag ] ) ) |
---|
1508 | <x:ref>If-Modified-Since</x:ref> = "If-Modified-Since:" OWS If-Modified-Since-v |
---|
1509 | <x:ref>If-Modified-Since-v</x:ref> = HTTP-date |
---|
1510 | <x:ref>If-None-Match</x:ref> = "If-None-Match:" OWS If-None-Match-v |
---|
1511 | <x:ref>If-None-Match-v</x:ref> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS |
---|
1512 | entity-tag ] ) ) |
---|
1513 | <x:ref>If-Unmodified-Since</x:ref> = "If-Unmodified-Since:" OWS |
---|
1514 | If-Unmodified-Since-v |
---|
1515 | <x:ref>If-Unmodified-Since-v</x:ref> = HTTP-date |
---|
1516 | |
---|
1517 | <x:ref>Last-Modified</x:ref> = "Last-Modified:" OWS Last-Modified-v |
---|
1518 | <x:ref>Last-Modified-v</x:ref> = HTTP-date |
---|
1519 | |
---|
1520 | <x:ref>OWS</x:ref> = <OWS, defined in [Part1], Section 1.2.2> |
---|
1521 | |
---|
1522 | <x:ref>entity-tag</x:ref> = [ weak ] opaque-tag |
---|
1523 | |
---|
1524 | <x:ref>opaque-tag</x:ref> = quoted-string |
---|
1525 | |
---|
1526 | <x:ref>quoted-string</x:ref> = <quoted-string, defined in [Part1], Section 1.2.2> |
---|
1527 | |
---|
1528 | <x:ref>weak</x:ref> = %x57.2F ; W/ |
---|
1529 | </artwork> |
---|
1530 | </figure> |
---|
1531 | <figure><preamble>ABNF diagnostics:</preamble><artwork type="inline"> |
---|
1532 | ; ETag defined but not used |
---|
1533 | ; If-Match defined but not used |
---|
1534 | ; If-Modified-Since defined but not used |
---|
1535 | ; If-None-Match defined but not used |
---|
1536 | ; If-Unmodified-Since defined but not used |
---|
1537 | ; Last-Modified defined but not used |
---|
1538 | </artwork></figure></section> |
---|
1539 | <?ENDINC p4-conditional.abnf-appendix ?> |
---|
1540 | |
---|
1541 | <section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log"> |
---|
1542 | |
---|
1543 | <section title="Since RFC2616"> |
---|
1544 | <t> |
---|
1545 | Extracted relevant partitions from <xref target="RFC2616"/>. |
---|
1546 | </t> |
---|
1547 | </section> |
---|
1548 | |
---|
1549 | <section title="Since draft-ietf-httpbis-p4-conditional-00"> |
---|
1550 | <t> |
---|
1551 | Closed issues: |
---|
1552 | <list style="symbols"> |
---|
1553 | <t> |
---|
1554 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/35"/>: |
---|
1555 | "Normative and Informative references" |
---|
1556 | </t> |
---|
1557 | </list> |
---|
1558 | </t> |
---|
1559 | <t> |
---|
1560 | Other changes: |
---|
1561 | <list style="symbols"> |
---|
1562 | <t> |
---|
1563 | Move definitions of 304 and 412 condition codes from Part2. |
---|
1564 | </t> |
---|
1565 | </list> |
---|
1566 | </t> |
---|
1567 | </section> |
---|
1568 | |
---|
1569 | <section title="Since draft-ietf-httpbis-p4-conditional-01"> |
---|
1570 | <t> |
---|
1571 | Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>): |
---|
1572 | <list style="symbols"> |
---|
1573 | <t> |
---|
1574 | Add explicit references to BNF syntax and rules imported from other parts of the specification. |
---|
1575 | </t> |
---|
1576 | </list> |
---|
1577 | </t> |
---|
1578 | </section> |
---|
1579 | |
---|
1580 | <section title="Since draft-ietf-httpbis-p4-conditional-02" anchor="changes.since.02"> |
---|
1581 | <t> |
---|
1582 | Closed issues: |
---|
1583 | <list style="symbols"> |
---|
1584 | <t> |
---|
1585 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/116"/>: |
---|
1586 | "Weak ETags on non-GET requests" |
---|
1587 | </t> |
---|
1588 | </list> |
---|
1589 | </t> |
---|
1590 | <t> |
---|
1591 | Ongoing work on IANA Message Header Registration (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/40"/>): |
---|
1592 | <list style="symbols"> |
---|
1593 | <t> |
---|
1594 | Reference RFC 3984, and update header registrations for headers defined |
---|
1595 | in this document. |
---|
1596 | </t> |
---|
1597 | </list> |
---|
1598 | </t> |
---|
1599 | </section> |
---|
1600 | |
---|
1601 | <section title="Since draft-ietf-httpbis-p4-conditional-03" anchor="changes.since.03"> |
---|
1602 | <t> |
---|
1603 | Closed issues: |
---|
1604 | <list style="symbols"> |
---|
1605 | <t> |
---|
1606 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/71"/>: |
---|
1607 | "Examples for ETag matching" |
---|
1608 | </t> |
---|
1609 | <t> |
---|
1610 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/124"/>: |
---|
1611 | "'entity value' undefined" |
---|
1612 | </t> |
---|
1613 | <t> |
---|
1614 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/126"/>: |
---|
1615 | "bogus 2068 Date header reference" |
---|
1616 | </t> |
---|
1617 | </list> |
---|
1618 | </t> |
---|
1619 | </section> |
---|
1620 | |
---|
1621 | <section title="Since draft-ietf-httpbis-p4-conditional-04" anchor="changes.since.04"> |
---|
1622 | <t> |
---|
1623 | Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>): |
---|
1624 | <list style="symbols"> |
---|
1625 | <t> |
---|
1626 | Use "/" instead of "|" for alternatives. |
---|
1627 | </t> |
---|
1628 | <t> |
---|
1629 | Introduce new ABNF rules for "bad" whitespace ("BWS"), optional |
---|
1630 | whitespace ("OWS") and required whitespace ("RWS"). |
---|
1631 | </t> |
---|
1632 | <t> |
---|
1633 | Rewrite ABNFs to spell out whitespace rules, factor out |
---|
1634 | header value format definitions. |
---|
1635 | </t> |
---|
1636 | </list> |
---|
1637 | </t> |
---|
1638 | </section> |
---|
1639 | |
---|
1640 | <section title="Since draft-ietf-httpbis-p4-conditional-05" anchor="changes.since.05"> |
---|
1641 | <t> |
---|
1642 | Final work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>): |
---|
1643 | <list style="symbols"> |
---|
1644 | <t> |
---|
1645 | Add appendix containing collected and expanded ABNF, reorganize ABNF introduction. |
---|
1646 | </t> |
---|
1647 | </list> |
---|
1648 | </t> |
---|
1649 | </section> |
---|
1650 | |
---|
1651 | <section title="Since draft-ietf-httpbis-p4-conditional-06" anchor="changes.since.06"> |
---|
1652 | <t> |
---|
1653 | Closed issues: |
---|
1654 | <list style="symbols"> |
---|
1655 | <t> |
---|
1656 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/153"/>: |
---|
1657 | "case-sensitivity of etag weakness indicator" |
---|
1658 | </t> |
---|
1659 | </list> |
---|
1660 | </t> |
---|
1661 | </section> |
---|
1662 | |
---|
1663 | <section title="Since draft-ietf-httpbis-p4-conditional-07" anchor="changes.since.07"> |
---|
1664 | <t> |
---|
1665 | Closed issues: |
---|
1666 | <list style="symbols"> |
---|
1667 | <t> |
---|
1668 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/116"/>: |
---|
1669 | "Weak ETags on non-GET requests" (If-Match still was defined to require |
---|
1670 | strong matching) |
---|
1671 | </t> |
---|
1672 | <t> |
---|
1673 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/198"/>: |
---|
1674 | "move IANA registrations for optional status codes" |
---|
1675 | </t> |
---|
1676 | </list> |
---|
1677 | </t> |
---|
1678 | </section> |
---|
1679 | |
---|
1680 | <section title="Since draft-ietf-httpbis-p4-conditional-08" anchor="changes.since.08"> |
---|
1681 | <t> |
---|
1682 | No significant changes. |
---|
1683 | </t> |
---|
1684 | </section> |
---|
1685 | |
---|
1686 | <section title="Since draft-ietf-httpbis-p4-conditional-09" anchor="changes.since.09"> |
---|
1687 | <t> |
---|
1688 | No significant changes. |
---|
1689 | </t> |
---|
1690 | </section> |
---|
1691 | |
---|
1692 | <section title="Since draft-ietf-httpbis-p4-conditional-10" anchor="changes.since.10"> |
---|
1693 | <t> |
---|
1694 | Closed issues: |
---|
1695 | <list style="symbols"> |
---|
1696 | <t> |
---|
1697 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/69"/>: |
---|
1698 | "Clarify 'Requested Variant'" |
---|
1699 | </t> |
---|
1700 | <t> |
---|
1701 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/109"/>: |
---|
1702 | "Clarify entity / representation / variant terminology" |
---|
1703 | </t> |
---|
1704 | <t> |
---|
1705 | <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/220"/>: |
---|
1706 | "consider removing the 'changes from 2068' sections" |
---|
1707 | </t> |
---|
1708 | </list> |
---|
1709 | </t> |
---|
1710 | </section> |
---|
1711 | |
---|
1712 | </section> |
---|
1713 | |
---|
1714 | </back> |
---|
1715 | </rfc> |
---|