Ignore:
Timestamp:
Sep 2, 2011, 6:55:23 PM (8 years ago)
Author:
fielding@…
Message:

(editorial) Move Date and HTTP-date from p1 to p2.
Move bizarre clockless requirements to p4 (Last-Modified) and p6 (Expires)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p2-semantics.xml

    r1435 r1436  
    3333  <!ENTITY intermediaries             "<xref target='Part1' x:rel='#intermediaries' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    3434  <!ENTITY chunked-encoding           "<xref target='Part1' x:rel='#chunked.encoding' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    35   <!ENTITY full-date                  "<xref target='Part1' x:rel='#date.time.formats.full.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    3635  <!ENTITY http-url                   "<xref target='Part1' x:rel='#http-url' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    3736  <!ENTITY http-version               "<xref target='Part1' x:rel='#http.version' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     
    361360  <x:anchor-alias value="absolute-URI"/>
    362361  <x:anchor-alias value="comment"/>
    363   <x:anchor-alias value="HTTP-date"/>
    364362  <x:anchor-alias value="partial-URI"/>
    365363  <x:anchor-alias value="product"/>
     
    371369  <x:ref>absolute-URI</x:ref>  = &lt;absolute-URI, defined in &uri;&gt;
    372370  <x:ref>comment</x:ref>       = &lt;comment, defined in &header-fields;&gt;
    373   <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &full-date;&gt;
    374371  <x:ref>partial-URI</x:ref>   = &lt;partial-URI, defined in &uri;&gt;
    375372  <x:ref>product</x:ref>       = &lt;product, defined in &product-tokens;&gt;
     
    594591  <c>Age</c> <c>&header-age;</c>
    595592  <c>Allow</c> <c><xref target="header.allow"/></c>
     593  <c>Date</c> <c><xref target="header.date"/></c>
    596594  <c>ETag</c> <c>&header-etag;</c>
    597595  <c>Location</c> <c><xref target="header.location"/></c>
     
    22802278
    22812279
     2280<section title="Date/Time Formats" anchor="http.date">
     2281  <x:anchor-alias value="HTTP-date"/>
     2282<t>
     2283   HTTP applications have historically allowed three different formats
     2284   for date/time stamps. However, the preferred format is a fixed-length subset
     2285   of that defined by <xref target="RFC1123"/>:
     2286</t>
     2287<figure><artwork type="example" x:indent-with="  ">
     2288Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
     2289</artwork></figure>
     2290<t>
     2291   The other formats are described here only for compatibility with obsolete
     2292   implementations.
     2293</t>
     2294<figure><artwork type="example" x:indent-with="  ">
     2295Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
     2296Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
     2297</artwork></figure>
     2298<t>
     2299   HTTP/1.1 clients and servers that parse a date value &MUST; accept
     2300   all three formats (for compatibility with HTTP/1.0), though they &MUST;
     2301   only generate the RFC 1123 format for representing HTTP-date values
     2302   in header fields.
     2303</t>
     2304<t>
     2305   All HTTP date/time stamps &MUST; be represented in Greenwich Mean Time
     2306   (GMT), without exception. For the purposes of HTTP, GMT is exactly
     2307   equal to UTC (Coordinated Universal Time). This is indicated in the
     2308   first two formats by the inclusion of "GMT" as the three-letter
     2309   abbreviation for time zone, and &MUST; be assumed when reading the
     2310   asctime format. HTTP-date is case sensitive and &MUST-NOT; include
     2311   additional whitespace beyond that specifically included as SP in the
     2312   grammar.
     2313</t>
     2314<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/>
     2315  <x:ref>HTTP-date</x:ref>    = <x:ref>rfc1123-date</x:ref> / <x:ref>obs-date</x:ref>
     2316</artwork></figure>
     2317<t anchor="preferred.date.format">
     2318  <x:anchor-alias value="rfc1123-date"/>
     2319  <x:anchor-alias value="time-of-day"/>
     2320  <x:anchor-alias value="hour"/>
     2321  <x:anchor-alias value="minute"/>
     2322  <x:anchor-alias value="second"/>
     2323  <x:anchor-alias value="day-name"/>
     2324  <x:anchor-alias value="day"/>
     2325  <x:anchor-alias value="month"/>
     2326  <x:anchor-alias value="year"/>
     2327  <x:anchor-alias value="GMT"/>
     2328  Preferred format:
     2329</t>
     2330<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="rfc1123-date"/><iref primary="true" item="Grammar" subitem="date1"/><iref primary="true" item="Grammar" subitem="time-of-day"/><iref primary="true" item="Grammar" subitem="hour"/><iref primary="true" item="Grammar" subitem="minute"/><iref primary="true" item="Grammar" subitem="second"/><iref primary="true" item="Grammar" subitem="day-name"/><iref primary="true" item="Grammar" subitem="day-name-l"/><iref primary="true" item="Grammar" subitem="day"/><iref primary="true" item="Grammar" subitem="month"/><iref primary="true" item="Grammar" subitem="year"/><iref primary="true" item="Grammar" subitem="GMT"/>
     2331  <x:ref>rfc1123-date</x:ref> = <x:ref>day-name</x:ref> "," <x:ref>SP</x:ref> date1 <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>GMT</x:ref>
     2332  ; fixed length subset of the format defined in
     2333  ; <xref target="RFC1123" x:fmt="of" x:sec="5.2.14"/>
     2334 
     2335  <x:ref>day-name</x:ref>     = <x:abnf-char-sequence>"Mon"</x:abnf-char-sequence> ; "Mon", case-sensitive
     2336               / <x:abnf-char-sequence>"Tue"</x:abnf-char-sequence> ; "Tue", case-sensitive
     2337               / <x:abnf-char-sequence>"Wed"</x:abnf-char-sequence> ; "Wed", case-sensitive
     2338               / <x:abnf-char-sequence>"Thu"</x:abnf-char-sequence> ; "Thu", case-sensitive
     2339               / <x:abnf-char-sequence>"Fri"</x:abnf-char-sequence> ; "Fri", case-sensitive
     2340               / <x:abnf-char-sequence>"Sat"</x:abnf-char-sequence> ; "Sat", case-sensitive
     2341               / <x:abnf-char-sequence>"Sun"</x:abnf-char-sequence> ; "Sun", case-sensitive
     2342               
     2343  <x:ref>date1</x:ref>        = <x:ref>day</x:ref> <x:ref>SP</x:ref> <x:ref>month</x:ref> <x:ref>SP</x:ref> <x:ref>year</x:ref>
     2344               ; e.g., 02 Jun 1982
     2345
     2346  <x:ref>day</x:ref>          = 2<x:ref>DIGIT</x:ref>
     2347  <x:ref>month</x:ref>        = <x:abnf-char-sequence>"Jan"</x:abnf-char-sequence> ; "Jan", case-sensitive
     2348               / <x:abnf-char-sequence>"Feb"</x:abnf-char-sequence> ; "Feb", case-sensitive
     2349               / <x:abnf-char-sequence>"Mar"</x:abnf-char-sequence> ; "Mar", case-sensitive
     2350               / <x:abnf-char-sequence>"Apr"</x:abnf-char-sequence> ; "Apr", case-sensitive
     2351               / <x:abnf-char-sequence>"May"</x:abnf-char-sequence> ; "May", case-sensitive
     2352               / <x:abnf-char-sequence>"Jun"</x:abnf-char-sequence> ; "Jun", case-sensitive
     2353               / <x:abnf-char-sequence>"Jul"</x:abnf-char-sequence> ; "Jul", case-sensitive
     2354               / <x:abnf-char-sequence>"Aug"</x:abnf-char-sequence> ; "Aug", case-sensitive
     2355               / <x:abnf-char-sequence>"Sep"</x:abnf-char-sequence> ; "Sep", case-sensitive
     2356               / <x:abnf-char-sequence>"Oct"</x:abnf-char-sequence> ; "Oct", case-sensitive
     2357               / <x:abnf-char-sequence>"Nov"</x:abnf-char-sequence> ; "Nov", case-sensitive
     2358               / <x:abnf-char-sequence>"Dec"</x:abnf-char-sequence> ; "Dec", case-sensitive
     2359  <x:ref>year</x:ref>         = 4<x:ref>DIGIT</x:ref>
     2360
     2361  <x:ref>GMT</x:ref>   = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive
     2362
     2363  <x:ref>time-of-day</x:ref>  = <x:ref>hour</x:ref> ":" <x:ref>minute</x:ref> ":" <x:ref>second</x:ref>
     2364                 ; 00:00:00 - 23:59:59
     2365                 
     2366  <x:ref>hour</x:ref>         = 2<x:ref>DIGIT</x:ref>               
     2367  <x:ref>minute</x:ref>       = 2<x:ref>DIGIT</x:ref>               
     2368  <x:ref>second</x:ref>       = 2<x:ref>DIGIT</x:ref>               
     2369</artwork></figure>
     2370<t>
     2371  The semantics of <x:ref>day-name</x:ref>, <x:ref>day</x:ref>,
     2372  <x:ref>month</x:ref>, <x:ref>year</x:ref>, and <x:ref>time-of-day</x:ref> are the
     2373  same as those defined for the RFC 5322 constructs
     2374  with the corresponding name (<xref target="RFC5322" x:fmt="," x:sec="3.3"/>).
     2375</t>
     2376<t anchor="obsolete.date.formats">
     2377  <x:anchor-alias value="obs-date"/>
     2378  <x:anchor-alias value="rfc850-date"/>
     2379  <x:anchor-alias value="asctime-date"/>
     2380  <x:anchor-alias value="date1"/>
     2381  <x:anchor-alias value="date2"/>
     2382  <x:anchor-alias value="date3"/>
     2383  <x:anchor-alias value="rfc1123-date"/>
     2384  <x:anchor-alias value="day-name-l"/>
     2385  Obsolete formats:
     2386</t>
     2387<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="obs-date"/>
     2388  <x:ref>obs-date</x:ref>     = <x:ref>rfc850-date</x:ref> / <x:ref>asctime-date</x:ref>
     2389</artwork></figure>
     2390<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="rfc850-date"/>
     2391  <x:ref>rfc850-date</x:ref>  = <x:ref>day-name-l</x:ref> "," <x:ref>SP</x:ref> <x:ref>date2</x:ref> <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>GMT</x:ref>
     2392  <x:ref>date2</x:ref>        = <x:ref>day</x:ref> "-" <x:ref>month</x:ref> "-" 2<x:ref>DIGIT</x:ref>
     2393                 ; day-month-year (e.g., 02-Jun-82)
     2394
     2395  <x:ref>day-name-l</x:ref>   = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence> ; "Monday", case-sensitive
     2396         / <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence> ; "Tuesday", case-sensitive
     2397         / <x:abnf-char-sequence>"Wednesday"</x:abnf-char-sequence> ; "Wednesday", case-sensitive
     2398         / <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence> ; "Thursday", case-sensitive
     2399         / <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence> ; "Friday", case-sensitive
     2400         / <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence> ; "Saturday", case-sensitive
     2401         / <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence> ; "Sunday", case-sensitive
     2402</artwork></figure>
     2403<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="asctime-date"/>
     2404  <x:ref>asctime-date</x:ref> = <x:ref>day-name</x:ref> <x:ref>SP</x:ref> <x:ref>date3</x:ref> <x:ref>SP</x:ref> <x:ref>time-of-day</x:ref> <x:ref>SP</x:ref> <x:ref>year</x:ref>
     2405  <x:ref>date3</x:ref>        = <x:ref>month</x:ref> <x:ref>SP</x:ref> ( 2<x:ref>DIGIT</x:ref> / ( <x:ref>SP</x:ref> 1<x:ref>DIGIT</x:ref> ))
     2406                 ; month day (e.g., Jun  2)
     2407</artwork></figure>
     2408<x:note>
     2409  <t>
     2410    <x:h>Note:</x:h> Recipients of date values are encouraged to be robust in
     2411    accepting date values that might have been sent by non-HTTP
     2412    applications, as is sometimes the case when retrieving or posting
     2413    messages via proxies/gateways to SMTP or NNTP.
     2414  </t>
     2415</x:note>
     2416<x:note>
     2417  <t>
     2418    <x:h>Note:</x:h> HTTP requirements for the date/time stamp format apply only
     2419    to their usage within the protocol stream. Clients and servers are
     2420    not required to use these formats for user presentation, request
     2421    logging, etc.
     2422  </t>
     2423</x:note>
     2424</section>
     2425
     2426
    22822427<section title="Header Field Definitions" anchor="header.field.definitions">
    22832428<t>
     
    23122457   understand all the methods specified in order to handle them according to
    23132458   the generic message handling rules.
     2459</t>
     2460</section>
     2461
     2462<section title="Date" anchor="header.date">
     2463  <iref primary="true" item="Date header field" x:for-anchor=""/>
     2464  <iref primary="true" item="Header Fields" subitem="Date" x:for-anchor=""/>
     2465  <x:anchor-alias value="Date"/>
     2466<t>
     2467   The "Date" header field represents the date and time at which
     2468   the message was originated, having the same semantics as the Origination
     2469   Date Field (orig-date) defined in <xref target="RFC5322" x:fmt="of" x:sec="3.6.1"/>.
     2470   The field value is an HTTP-date, as defined in <xref target="http.date"/>;
     2471   it &MUST; be sent in rfc1123-date format.
     2472</t>
     2473<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Date"/>
     2474  <x:ref>Date</x:ref> = <x:ref>HTTP-date</x:ref>
     2475</artwork></figure>
     2476<t>
     2477   An example is
     2478</t>
     2479<figure><artwork type="example">
     2480  Date: Tue, 15 Nov 1994 08:12:31 GMT
     2481</artwork></figure>
     2482<t>
     2483   Origin servers &MUST; include a Date header field in all responses,
     2484   except in these cases:
     2485  <list style="numbers">
     2486      <t>If the response status code is 100 (Continue) or 101 (Switching
     2487         Protocols), the response &MAY; include a Date header field, at
     2488         the server's option.</t>
     2489
     2490      <t>If the response status code conveys a server error, e.g., 500
     2491         (Internal Server Error) or 503 (Service Unavailable), and it is
     2492         inconvenient or impossible to generate a valid Date.</t>
     2493
     2494      <t>If the server does not have a clock that can provide a
     2495         reasonable approximation of the current time, its responses
     2496         &MUST-NOT; include a Date header field.</t>
     2497  </list>
     2498</t>
     2499<t>
     2500   A received message that does not have a Date header field &MUST; be
     2501   assigned one by the recipient if the message will be cached by that
     2502   recipient.
     2503</t>
     2504<t>
     2505   Clients can use the Date header field as well; in order to keep request
     2506   messages small, they are advised not to include it when it doesn't convey
     2507   any useful information (as it is usually the case for requests that do not
     2508   contain a payload).
     2509</t>
     2510<t>
     2511   The HTTP-date sent in a Date header field &SHOULD-NOT; represent a date and
     2512   time subsequent to the generation of the message. It &SHOULD; represent
     2513   the best available approximation of the date and time of message
     2514   generation, unless the implementation has no means of generating a
     2515   reasonably accurate date and time. In theory, the date ought to
     2516   represent the moment just before the payload is generated. In
     2517   practice, the date can be generated at any time during the message
     2518   origination without affecting its semantic value.
    23142519</t>
    23152520</section>
     
    29553160   <c>
    29563161      <xref target="header.allow"/>
     3162   </c>
     3163   <c>Date</c>
     3164   <c>http</c>
     3165   <c>standard</c>
     3166   <c>
     3167      <xref target="header.date"/>
    29573168   </c>
    29583169   <c>Expect</c>
     
    34843695<references title="Informative References">
    34853696
     3697<reference anchor="RFC1123">
     3698  <front>
     3699    <title>Requirements for Internet Hosts - Application and Support</title>
     3700    <author initials="R." surname="Braden" fullname="Robert Braden">
     3701      <organization>University of Southern California (USC), Information Sciences Institute</organization>
     3702      <address><email>Braden@ISI.EDU</email></address>
     3703    </author>
     3704    <date month="October" year="1989"/>
     3705  </front>
     3706  <seriesInfo name="STD" value="3"/>
     3707  <seriesInfo name="RFC" value="1123"/>
     3708</reference>
     3709
    34863710<reference anchor="RFC1945">
    34873711  <front>
     
    37543978<x:ref>Allow</x:ref> = [ ( "," / Method ) *( OWS "," [ OWS Method ] ) ]
    37553979
     3980<x:ref>Date</x:ref> = HTTP-date
     3981
    37563982<x:ref>Expect</x:ref> = *( "," OWS ) expectation *( OWS "," [ OWS expectation ] )
    37573983
    37583984<x:ref>From</x:ref> = mailbox
    37593985
    3760 <x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part1], Section 5.1&gt;
     3986<x:ref>GMT</x:ref> = %x47.4D.54 ; GMT
     3987
     3988<x:ref>HTTP-date</x:ref> = rfc1123-date / obs-date
    37613989
    37623990<x:ref>Location</x:ref> = URI-reference
     
    37794007
    37804008<x:ref>absolute-URI</x:ref> = &lt;absolute-URI, defined in [Part1], Section 2.7&gt;
     4009<x:ref>asctime-date</x:ref> = day-name SP date3 SP time-of-day SP year
    37814010
    37824011<x:ref>comment</x:ref> = &lt;comment, defined in [Part1], Section 3.2&gt;
    37834012
     4013<x:ref>date1</x:ref> = day SP month SP year
     4014<x:ref>date2</x:ref> = day "-" month "-" 2DIGIT
     4015<x:ref>date3</x:ref> = month SP ( 2DIGIT / ( SP DIGIT ) )
     4016<x:ref>day</x:ref> = 2DIGIT
     4017<x:ref>day-name</x:ref> = %x4D.6F.6E ; Mon
     4018 / %x54.75.65 ; Tue
     4019 / %x57.65.64 ; Wed
     4020 / %x54.68.75 ; Thu
     4021 / %x46.72.69 ; Fri
     4022 / %x53.61.74 ; Sat
     4023 / %x53.75.6E ; Sun
     4024<x:ref>day-name-l</x:ref> = %x4D.6F.6E.64.61.79 ; Monday
     4025 / %x54.75.65.73.64.61.79 ; Tuesday
     4026 / %x57.65.64.6E.65.73.64.61.79 ; Wednesday
     4027 / %x54.68.75.72.73.64.61.79 ; Thursday
     4028 / %x46.72.69.64.61.79 ; Friday
     4029 / %x53.61.74.75.72.64.61.79 ; Saturday
     4030 / %x53.75.6E.64.61.79 ; Sunday
    37844031<x:ref>delta-seconds</x:ref> = 1*DIGIT
    37854032
     
    37894036 *expect-params ]
    37904037
     4038<x:ref>hour</x:ref> = 2DIGIT
     4039
    37914040<x:ref>mailbox</x:ref> = &lt;mailbox, defined in [RFC5322], Section 3.4&gt;
    3792 
     4041<x:ref>minute</x:ref> = 2DIGIT
     4042<x:ref>month</x:ref> = %x4A.61.6E ; Jan
     4043 / %x46.65.62 ; Feb
     4044 / %x4D.61.72 ; Mar
     4045 / %x41.70.72 ; Apr
     4046 / %x4D.61.79 ; May
     4047 / %x4A.75.6E ; Jun
     4048 / %x4A.75.6C ; Jul
     4049 / %x41.75.67 ; Aug
     4050 / %x53.65.70 ; Sep
     4051 / %x4F.63.74 ; Oct
     4052 / %x4E.6F.76 ; Nov
     4053 / %x44.65.63 ; Dec
     4054
     4055<x:ref>obs-date</x:ref> = rfc850-date / asctime-date
    37934056<x:ref>obs-text</x:ref> = &lt;obs-text, defined in [Part1], Section 1.2.2&gt;
    37944057
    37954058<x:ref>partial-URI</x:ref> = &lt;partial-URI, defined in [Part1], Section 2.7&gt;
    3796 <x:ref>product</x:ref> = &lt;product, defined in [Part1], Section 5.3&gt;
     4059<x:ref>product</x:ref> = &lt;product, defined in [Part1], Section 5.2&gt;
    37974060
    37984061<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 3.2.3&gt;
    37994062
     4063<x:ref>rfc1123-date</x:ref> = day-name "," SP date1 SP time-of-day SP GMT
     4064<x:ref>rfc850-date</x:ref> = day-name-l "," SP date2 SP time-of-day SP GMT
     4065
     4066<x:ref>second</x:ref> = 2DIGIT
     4067
     4068<x:ref>time-of-day</x:ref> = hour ":" minute ":" second
    38004069<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 3.2.3&gt;
     4070
     4071<x:ref>year</x:ref> = 4DIGIT
    38014072</artwork>
    38024073</figure>
    38034074<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
    38044075; Allow defined but not used
     4076; Date defined but not used
    38054077; Expect defined but not used
    38064078; From defined but not used
Note: See TracChangeset for help on using the changeset viewer.