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/p1-messaging.xml

    r1435 r1436  
    2626  <!ENTITY representation         "<xref target='Part3' x:rel='#representation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    2727  <!ENTITY header-cache-control   "<xref target='Part6' x:rel='#header.cache-control' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     28  <!ENTITY header-date                 "<xref target='Part2' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    2829  <!ENTITY header-expect          "<xref target='Part2' x:rel='#header.expect' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
    2930  <!ENTITY header-mime-version    "<xref target='Part3' x:rel='#mime-version' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
     
    13251326   The field-name token labels the corresponding field-value as having the
    13261327   semantics defined by that header field.  For example, the Date header field
    1327    is defined in <xref target="header.date"/> as containing the origination
     1328   is defined in &header-date; as containing the origination
    13281329   timestamp for the message in which it appears.
    13291330</t>
     
    20082009<section title="Protocol Parameters" anchor="protocol.parameters">
    20092010
    2010 <section title="Date/Time Formats: Full Date" anchor="date.time.formats.full.date">
    2011   <x:anchor-alias value="HTTP-date"/>
    2012 <t>
    2013    HTTP applications have historically allowed three different formats
    2014    for date/time stamps. However, the preferred format is a fixed-length subset
    2015    of that defined by <xref target="RFC1123"/>:
    2016 </t>
    2017 <figure><artwork type="example" x:indent-with="  ">
    2018 Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
    2019 </artwork></figure>
    2020 <t>
    2021    The other formats are described here only for compatibility with obsolete
    2022    implementations.
    2023 </t>
    2024 <figure><artwork type="example" x:indent-with="  ">
    2025 Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
    2026 Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
    2027 </artwork></figure>
    2028 <t>
    2029    HTTP/1.1 clients and servers that parse a date value &MUST; accept
    2030    all three formats (for compatibility with HTTP/1.0), though they &MUST;
    2031    only generate the RFC 1123 format for representing HTTP-date values
    2032    in header fields.
    2033 </t>
    2034 <t>
    2035    All HTTP date/time stamps &MUST; be represented in Greenwich Mean Time
    2036    (GMT), without exception. For the purposes of HTTP, GMT is exactly
    2037    equal to UTC (Coordinated Universal Time). This is indicated in the
    2038    first two formats by the inclusion of "GMT" as the three-letter
    2039    abbreviation for time zone, and &MUST; be assumed when reading the
    2040    asctime format. HTTP-date is case sensitive and &MUST-NOT; include
    2041    additional whitespace beyond that specifically included as SP in the
    2042    grammar.
    2043 </t>
    2044 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/>
    2045   <x:ref>HTTP-date</x:ref>    = <x:ref>rfc1123-date</x:ref> / <x:ref>obs-date</x:ref>
    2046 </artwork></figure>
    2047 <t anchor="preferred.date.format">
    2048   <x:anchor-alias value="rfc1123-date"/>
    2049   <x:anchor-alias value="time-of-day"/>
    2050   <x:anchor-alias value="hour"/>
    2051   <x:anchor-alias value="minute"/>
    2052   <x:anchor-alias value="second"/>
    2053   <x:anchor-alias value="day-name"/>
    2054   <x:anchor-alias value="day"/>
    2055   <x:anchor-alias value="month"/>
    2056   <x:anchor-alias value="year"/>
    2057   <x:anchor-alias value="GMT"/>
    2058   Preferred format:
    2059 </t>
    2060 <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"/>
    2061   <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>
    2062   ; fixed length subset of the format defined in
    2063   ; <xref target="RFC1123" x:fmt="of" x:sec="5.2.14"/>
    2064  
    2065   <x:ref>day-name</x:ref>     = <x:abnf-char-sequence>"Mon"</x:abnf-char-sequence> ; "Mon", case-sensitive
    2066                / <x:abnf-char-sequence>"Tue"</x:abnf-char-sequence> ; "Tue", case-sensitive
    2067                / <x:abnf-char-sequence>"Wed"</x:abnf-char-sequence> ; "Wed", case-sensitive
    2068                / <x:abnf-char-sequence>"Thu"</x:abnf-char-sequence> ; "Thu", case-sensitive
    2069                / <x:abnf-char-sequence>"Fri"</x:abnf-char-sequence> ; "Fri", case-sensitive
    2070                / <x:abnf-char-sequence>"Sat"</x:abnf-char-sequence> ; "Sat", case-sensitive
    2071                / <x:abnf-char-sequence>"Sun"</x:abnf-char-sequence> ; "Sun", case-sensitive
    2072                
    2073   <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>
    2074                ; e.g., 02 Jun 1982
    2075 
    2076   <x:ref>day</x:ref>          = 2<x:ref>DIGIT</x:ref>
    2077   <x:ref>month</x:ref>        = <x:abnf-char-sequence>"Jan"</x:abnf-char-sequence> ; "Jan", case-sensitive
    2078                / <x:abnf-char-sequence>"Feb"</x:abnf-char-sequence> ; "Feb", case-sensitive
    2079                / <x:abnf-char-sequence>"Mar"</x:abnf-char-sequence> ; "Mar", case-sensitive
    2080                / <x:abnf-char-sequence>"Apr"</x:abnf-char-sequence> ; "Apr", case-sensitive
    2081                / <x:abnf-char-sequence>"May"</x:abnf-char-sequence> ; "May", case-sensitive
    2082                / <x:abnf-char-sequence>"Jun"</x:abnf-char-sequence> ; "Jun", case-sensitive
    2083                / <x:abnf-char-sequence>"Jul"</x:abnf-char-sequence> ; "Jul", case-sensitive
    2084                / <x:abnf-char-sequence>"Aug"</x:abnf-char-sequence> ; "Aug", case-sensitive
    2085                / <x:abnf-char-sequence>"Sep"</x:abnf-char-sequence> ; "Sep", case-sensitive
    2086                / <x:abnf-char-sequence>"Oct"</x:abnf-char-sequence> ; "Oct", case-sensitive
    2087                / <x:abnf-char-sequence>"Nov"</x:abnf-char-sequence> ; "Nov", case-sensitive
    2088                / <x:abnf-char-sequence>"Dec"</x:abnf-char-sequence> ; "Dec", case-sensitive
    2089   <x:ref>year</x:ref>         = 4<x:ref>DIGIT</x:ref>
    2090 
    2091   <x:ref>GMT</x:ref>   = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive
    2092 
    2093   <x:ref>time-of-day</x:ref>  = <x:ref>hour</x:ref> ":" <x:ref>minute</x:ref> ":" <x:ref>second</x:ref>
    2094                  ; 00:00:00 - 23:59:59
    2095                  
    2096   <x:ref>hour</x:ref>         = 2<x:ref>DIGIT</x:ref>               
    2097   <x:ref>minute</x:ref>       = 2<x:ref>DIGIT</x:ref>               
    2098   <x:ref>second</x:ref>       = 2<x:ref>DIGIT</x:ref>               
    2099 </artwork></figure>
    2100 <t>
    2101   The semantics of <x:ref>day-name</x:ref>, <x:ref>day</x:ref>,
    2102   <x:ref>month</x:ref>, <x:ref>year</x:ref>, and <x:ref>time-of-day</x:ref> are the
    2103   same as those defined for the RFC 5322 constructs
    2104   with the corresponding name (<xref target="RFC5322" x:fmt="," x:sec="3.3"/>).
    2105 </t>
    2106 <t anchor="obsolete.date.formats">
    2107   <x:anchor-alias value="obs-date"/>
    2108   <x:anchor-alias value="rfc850-date"/>
    2109   <x:anchor-alias value="asctime-date"/>
    2110   <x:anchor-alias value="date1"/>
    2111   <x:anchor-alias value="date2"/>
    2112   <x:anchor-alias value="date3"/>
    2113   <x:anchor-alias value="rfc1123-date"/>
    2114   <x:anchor-alias value="day-name-l"/>
    2115   Obsolete formats:
    2116 </t>
    2117 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="obs-date"/>
    2118   <x:ref>obs-date</x:ref>     = <x:ref>rfc850-date</x:ref> / <x:ref>asctime-date</x:ref>
    2119 </artwork></figure>
    2120 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="rfc850-date"/>
    2121   <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>
    2122   <x:ref>date2</x:ref>        = <x:ref>day</x:ref> "-" <x:ref>month</x:ref> "-" 2<x:ref>DIGIT</x:ref>
    2123                  ; day-month-year (e.g., 02-Jun-82)
    2124 
    2125   <x:ref>day-name-l</x:ref>   = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence> ; "Monday", case-sensitive
    2126          / <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence> ; "Tuesday", case-sensitive
    2127          / <x:abnf-char-sequence>"Wednesday"</x:abnf-char-sequence> ; "Wednesday", case-sensitive
    2128          / <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence> ; "Thursday", case-sensitive
    2129          / <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence> ; "Friday", case-sensitive
    2130          / <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence> ; "Saturday", case-sensitive
    2131          / <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence> ; "Sunday", case-sensitive
    2132 </artwork></figure>
    2133 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="asctime-date"/>
    2134   <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>
    2135   <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> ))
    2136                  ; month day (e.g., Jun  2)
    2137 </artwork></figure>
    2138 <x:note>
    2139   <t>
    2140     <x:h>Note:</x:h> Recipients of date values are encouraged to be robust in
    2141     accepting date values that might have been sent by non-HTTP
    2142     applications, as is sometimes the case when retrieving or posting
    2143     messages via proxies/gateways to SMTP or NNTP.
    2144   </t>
    2145 </x:note>
    2146 <x:note>
    2147   <t>
    2148     <x:h>Note:</x:h> HTTP requirements for the date/time stamp format apply only
    2149     to their usage within the protocol stream. Clients and servers are
    2150     not required to use these formats for user presentation, request
    2151     logging, etc.
    2152   </t>
    2153 </x:note>
    2154 </section>
    2155 
    21562011<section title="Transfer Codings" anchor="transfer.codings">
    21572012  <x:anchor-alias value="transfer-coding"/>
     
    30432898  <c>Connection</c> <c><xref target="header.connection"/></c>
    30442899  <c>Content-Length</c> <c><xref target="header.content-length"/></c>
    3045   <c>Date</c> <c><xref target="header.date"/></c>
    30462900  <c>Host</c> <c><xref target="header.host"/></c>
    30472901  <c>TE</c> <c><xref target="header.te"/></c>
     
    31783032   used within the "message/external-body" content-type.
    31793033</t>
    3180 </section>
    3181 
    3182 <section title="Date" anchor="header.date">
    3183   <iref primary="true" item="Date header field" x:for-anchor=""/>
    3184   <iref primary="true" item="Header Fields" subitem="Date" x:for-anchor=""/>
    3185   <x:anchor-alias value="Date"/>
    3186 <t>
    3187    The "Date" header field represents the date and time at which
    3188    the message was originated, having the same semantics as the Origination
    3189    Date Field (orig-date) defined in <xref target="RFC5322" x:fmt="of" x:sec="3.6.1"/>.
    3190    The field value is an HTTP-date, as described in <xref target="date.time.formats.full.date"/>;
    3191    it &MUST; be sent in rfc1123-date format.
    3192 </t>
    3193 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Date"/>
    3194   <x:ref>Date</x:ref> = <x:ref>HTTP-date</x:ref>
    3195 </artwork></figure>
    3196 <t>
    3197    An example is
    3198 </t>
    3199 <figure><artwork type="example">
    3200   Date: Tue, 15 Nov 1994 08:12:31 GMT
    3201 </artwork></figure>
    3202 <t>
    3203    Origin servers &MUST; include a Date header field in all responses,
    3204    except in these cases:
    3205   <list style="numbers">
    3206       <t>If the response status code is 100 (Continue) or 101 (Switching
    3207          Protocols), the response &MAY; include a Date header field, at
    3208          the server's option.</t>
    3209 
    3210       <t>If the response status code conveys a server error, e.g., 500
    3211          (Internal Server Error) or 503 (Service Unavailable), and it is
    3212          inconvenient or impossible to generate a valid Date.</t>
    3213 
    3214       <t>If the server does not have a clock that can provide a
    3215          reasonable approximation of the current time, its responses
    3216          &MUST-NOT; include a Date header field. In this case, the rules
    3217          in <xref target="clockless.origin.server.operation"/> &MUST; be followed.</t>
    3218   </list>
    3219 </t>
    3220 <t>
    3221    A received message that does not have a Date header field &MUST; be
    3222    assigned one by the recipient if the message will be cached by that
    3223    recipient.
    3224 </t>
    3225 <t>
    3226    Clients can use the Date header field as well; in order to keep request
    3227    messages small, they are advised not to include it when it doesn't convey
    3228    any useful information (as it is usually the case for requests that do not
    3229    contain a payload).
    3230 </t>
    3231 <t>
    3232    The HTTP-date sent in a Date header field &SHOULD-NOT;  represent a date and
    3233    time subsequent to the generation of the message. It &SHOULD; represent
    3234    the best available approximation of the date and time of message
    3235    generation, unless the implementation has no means of generating a
    3236    reasonably accurate date and time. In theory, the date ought to
    3237    represent the moment just before the payload is generated. In
    3238    practice, the date can be generated at any time during the message
    3239    origination without affecting its semantic value.
    3240 </t>
    3241 
    3242 <section title="Clockless Origin Server Operation" anchor="clockless.origin.server.operation">
    3243 <t>
    3244    Some origin server implementations might not have a clock available.
    3245    An origin server without a clock &MUST-NOT; assign Expires or Last-Modified
    3246    values to a response, unless these values were associated
    3247    with the resource by a system or user with a reliable clock. It &MAY;
    3248    assign an Expires value that is known, at or before server
    3249    configuration time, to be in the past (this allows "pre-expiration"
    3250    of responses without storing separate Expires values for each
    3251    resource).
    3252 </t>
    3253 </section>
    32543034</section>
    32553035
     
    37013481   <c>
    37023482      <xref target="header.content-length"/>
    3703    </c>
    3704    <c>Date</c>
    3705    <c>http</c>
    3706    <c>standard</c>
    3707    <c>
    3708       <xref target="header.date"/>
    37093483   </c>
    37103484   <c>Host</c>
     
    46584432</reference>
    46594433
    4660 <reference anchor="RFC1123">
    4661   <front>
    4662     <title>Requirements for Internet Hosts - Application and Support</title>
    4663     <author initials="R." surname="Braden" fullname="Robert Braden">
    4664       <organization>University of Southern California (USC), Information Sciences Institute</organization>
    4665       <address><email>Braden@ISI.EDU</email></address>
    4666     </author>
    4667     <date month="October" year="1989"/>
    4668   </front>
    4669   <seriesInfo name="STD" value="3"/>
    4670   <seriesInfo name="RFC" value="1123"/>
    4671 </reference>
    4672 
    46734434<reference anchor='RFC1919'>
    46744435  <front>
     
    52615022<x:ref>Content-Length</x:ref> = 1*DIGIT
    52625023
    5263 <x:ref>Date</x:ref> = HTTP-date
    5264 
    5265 <x:ref>GMT</x:ref> = %x47.4D.54 ; GMT
    5266 
    52675024<x:ref>HTTP-Prot-Name</x:ref> = %x48.54.54.50 ; HTTP
    52685025<x:ref>HTTP-Version</x:ref> = HTTP-Prot-Name "/" DIGIT "." DIGIT
    5269 <x:ref>HTTP-date</x:ref> = rfc1123-date / obs-date
    52705026<x:ref>HTTP-message</x:ref> = start-line *( header-field CRLF ) CRLF [ message-body
    52715027 ]
     
    52965052
    52975053<x:ref>absolute-URI</x:ref> = &lt;absolute-URI, defined in [RFC3986], Section 4.3&gt;
    5298 <x:ref>asctime-date</x:ref> = day-name SP date3 SP time-of-day SP year
    52995054<x:ref>attribute</x:ref> = token
    53005055<x:ref>authority</x:ref> = &lt;authority, defined in [RFC3986], Section 3.2&gt;
     
    53135068 / obs-text
    53145069
    5315 <x:ref>date1</x:ref> = day SP month SP year
    5316 <x:ref>date2</x:ref> = day "-" month "-" 2DIGIT
    5317 <x:ref>date3</x:ref> = month SP ( 2DIGIT / ( SP DIGIT ) )
    5318 <x:ref>day</x:ref> = 2DIGIT
    5319 <x:ref>day-name</x:ref> = %x4D.6F.6E ; Mon
    5320  / %x54.75.65 ; Tue
    5321  / %x57.65.64 ; Wed
    5322  / %x54.68.75 ; Thu
    5323  / %x46.72.69 ; Fri
    5324  / %x53.61.74 ; Sat
    5325  / %x53.75.6E ; Sun
    5326 <x:ref>day-name-l</x:ref> = %x4D.6F.6E.64.61.79 ; Monday
    5327  / %x54.75.65.73.64.61.79 ; Tuesday
    5328  / %x57.65.64.6E.65.73.64.61.79 ; Wednesday
    5329  / %x54.68.75.72.73.64.61.79 ; Thursday
    5330  / %x46.72.69.64.61.79 ; Friday
    5331  / %x53.61.74.75.72.64.61.79 ; Saturday
    5332  / %x53.75.6E.64.61.79 ; Sunday
    5333 
    53345070<x:ref>field-content</x:ref> = *( HTAB / SP / VCHAR / obs-text )
    53355071<x:ref>field-name</x:ref> = token
     
    53375073
    53385074<x:ref>header-field</x:ref> = field-name ":" OWS field-value BWS
    5339 <x:ref>hour</x:ref> = 2DIGIT
    53405075<x:ref>http-URI</x:ref> = "http://" authority path-abempty [ "?" query ]
    53415076<x:ref>https-URI</x:ref> = "https://" authority path-abempty [ "?" query ]
     
    53445079
    53455080<x:ref>message-body</x:ref> = *OCTET
    5346 <x:ref>minute</x:ref> = 2DIGIT
    5347 <x:ref>month</x:ref> = %x4A.61.6E ; Jan
    5348  / %x46.65.62 ; Feb
    5349  / %x4D.61.72 ; Mar
    5350  / %x41.70.72 ; Apr
    5351  / %x4D.61.79 ; May
    5352  / %x4A.75.6E ; Jun
    5353  / %x4A.75.6C ; Jul
    5354  / %x41.75.67 ; Aug
    5355  / %x53.65.70 ; Sep
    5356  / %x4F.63.74 ; Oct
    5357  / %x4E.6F.76 ; Nov
    5358  / %x44.65.63 ; Dec
    5359 
    5360 <x:ref>obs-date</x:ref> = rfc850-date / asctime-date
     5081
    53615082<x:ref>obs-fold</x:ref> = CRLF ( SP / HTAB )
    53625083<x:ref>obs-text</x:ref> = %x80-FF
     
    53905111<x:ref>request-target</x:ref> = "*" / absolute-URI / ( path-absolute [ "?" query ] )
    53915112 / authority
    5392 <x:ref>rfc1123-date</x:ref> = day-name "," SP date1 SP time-of-day SP GMT
    5393 <x:ref>rfc850-date</x:ref> = day-name-l "," SP date2 SP time-of-day SP GMT
    5394 
    5395 <x:ref>second</x:ref> = 2DIGIT
     5113
    53965114<x:ref>special</x:ref> = "(" / ")" / "&lt;" / "&gt;" / "@" / "," / ";" / ":" / "\" /
    53975115 DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
     
    54035121<x:ref>te-ext</x:ref> = OWS ";" OWS token [ "=" word ]
    54045122<x:ref>te-params</x:ref> = OWS ";" OWS "q=" qvalue *te-ext
    5405 <x:ref>time-of-day</x:ref> = hour ":" minute ":" second
    54065123<x:ref>token</x:ref> = 1*tchar
    54075124<x:ref>trailer-part</x:ref> = *( header-field CRLF )
     
    54165133
    54175134<x:ref>word</x:ref> = token / quoted-string
    5418 
    5419 <x:ref>year</x:ref> = 4DIGIT
    54205135</artwork>
    54215136</figure>
     
    54245139; Connection defined but not used
    54255140; Content-Length defined but not used
    5426 ; Date defined but not used
    54275141; HTTP-message defined but not used
    54285142; Host defined but not used
Note: See TracChangeset for help on using the changeset viewer.