Changeset 2082 for draft-ietf-httpbis/latest/p2-semantics.xml
- Timestamp:
- 04/01/13 10:29:06 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p2-semantics.xml
r2080 r2082 3516 3516 <x:anchor-alias value="HTTP-date"/> 3517 3517 <t> 3518 HTTP has historically allowed three different formats 3519 for date/time stamps. However, the preferred format is a fixed-length subset 3520 of that defined by <xref target="RFC1123"/>: 3521 </t> 3522 <figure><artwork type="example" x:indent-with=" "> 3523 Sun, 06 Nov 1994 08:49:37 GMT ; RFC 1123 3518 Prior to 1995, there were three different formats commonly used by servers 3519 to communicate timestamps. For compatibility with old implementations, all 3520 three are defined here. The preferred format is a fixed-length and 3521 single-zone subset of the date and time specification used by the 3522 Internet Message Format <xref target="RFC5322"/>. 3523 </t> 3524 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/> 3525 <x:ref>HTTP-date</x:ref> = <x:ref>IMF-fixdate</x:ref> / <x:ref>obs-date</x:ref> 3524 3526 </artwork></figure> 3525 <t> 3526 The other formats are described here only for compatibility with obsolete 3527 implementations. 3528 </t> 3529 <figure><artwork type="example" x:indent-with=" "> 3530 Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format 3531 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format 3527 <figure><preamble>An example of the preferred format is</preamble><artwork type="example" x:indent-with=" "> 3528 Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate 3532 3529 </artwork></figure> 3533 <t> 3534 HTTP always represents dates as an instance of Coordinated Universal Time 3535 (UTC), without exception; the first two formats indicate UTC as "GMT" in 3536 the three-letter abbreviation for time zone. Recipients &MAY; assume UTC 3537 even if the time zone abbreviation is missing, invalid, or might indicate 3538 some other time zone. 3539 </t> 3540 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/> 3541 <x:ref>HTTP-date</x:ref> = <x:ref>rfc1123-date</x:ref> / <x:ref>obs-date</x:ref> 3530 <figure><preamble>Examples of the two obsolete formats are</preamble><artwork type="example" x:indent-with=" "> 3531 Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format 3532 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format 3542 3533 </artwork></figure> 3534 <t> 3535 A recipient that parses a timestamp value in an HTTP header field &MUST; 3536 accept all three formats. A sender &MUST; generate the IMF-fixdate 3537 format when sending an HTTP-date value in a header field. 3538 </t> 3539 <t> 3540 An HTTP-date value represents time as an instance of Coordinated Universal 3541 Time (UTC). The first two formats indicate UTC by the three-letter 3542 abbreviation for Greenwich Mean Time, "GMT", a predecessor of the UTC name; 3543 values in the asctime format are assumed to be in UTC. 3544 A sender that generates HTTP-date values from a local clock ought to use 3545 NTP (<xref target="RFC1305"/>) or some similar protocol to synchronize its 3546 clock to UTC. 3547 </t> 3543 3548 <t anchor="preferred.date.format"> 3544 <x:anchor-alias value=" rfc1123-date"/>3549 <x:anchor-alias value="IMF-fixdate"/> 3545 3550 <x:anchor-alias value="time-of-day"/> 3546 3551 <x:anchor-alias value="hour"/> … … 3554 3559 Preferred format: 3555 3560 </t> 3556 <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"/>3557 <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>3558 ; fixed length subset of the format defined in3559 ; <xref target="RFC 1123" x:fmt="of" x:sec="5.2.14"/>3561 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="IMF-fixdate"/><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"/> 3562 <x:ref>IMF-fixdate</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> 3563 ; fixed length/zone subset of the format defined in 3564 ; <xref target="RFC5322" x:fmt="of" x:sec="3.3"/> 3560 3565 3561 3566 <x:ref>day-name</x:ref> = <x:abnf-char-sequence>"Mon"</x:abnf-char-sequence> ; "Mon", case-sensitive … … 3585 3590 <x:ref>year</x:ref> = 4<x:ref>DIGIT</x:ref> 3586 3591 3587 <x:ref>GMT</x:ref> = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive3592 <x:ref>GMT</x:ref> = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive 3588 3593 3589 3594 <x:ref>time-of-day</x:ref> = <x:ref>hour</x:ref> ":" <x:ref>minute</x:ref> ":" <x:ref>second</x:ref> 3590 ; 00:00:00 - 23:59:593595 ; 00:00:00 - 23:59:60 (leap second) 3591 3596 3592 3597 <x:ref>hour</x:ref> = 2<x:ref>DIGIT</x:ref> … … 3594 3599 <x:ref>second</x:ref> = 2<x:ref>DIGIT</x:ref> 3595 3600 </artwork></figure> 3596 <t>3597 The semantics of <x:ref>day-name</x:ref>, <x:ref>day</x:ref>,3598 <x:ref>month</x:ref>, <x:ref>year</x:ref>, and <x:ref>time-of-day</x:ref> are the3599 same as those defined for the RFC 5322 constructs3600 with the corresponding name (<xref target="RFC5322" x:fmt="," x:sec="3.3"/>).3601 </t>3602 3601 <t anchor="obsolete.date.formats"> 3603 3602 <x:anchor-alias value="obs-date"/> … … 3616 3615 <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> 3617 3616 <x:ref>date2</x:ref> = <x:ref>day</x:ref> "-" <x:ref>month</x:ref> "-" 2<x:ref>DIGIT</x:ref> 3618 ; day-month-year (e.g., 02-Jun-82)3619 3620 <x:ref>day-name-l</x:ref> = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence> ; "Monday", case-sensitive3621 / <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence> ; "Tuesday", case-sensitive3617 ; e.g., 02-Jun-82 3618 3619 <x:ref>day-name-l</x:ref> = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence> ; "Monday", case-sensitive 3620 / <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence> ; "Tuesday", case-sensitive 3622 3621 / <x:abnf-char-sequence>"Wednesday"</x:abnf-char-sequence> ; "Wednesday", case-sensitive 3623 / <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence> ; "Thursday", case-sensitive3624 / <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence> ; "Friday", case-sensitive3625 / <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence> ; "Saturday", case-sensitive3626 / <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence> ; "Sunday", case-sensitive3622 / <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence> ; "Thursday", case-sensitive 3623 / <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence> ; "Friday", case-sensitive 3624 / <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence> ; "Saturday", case-sensitive 3625 / <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence> ; "Sunday", case-sensitive 3627 3626 </artwork></figure> 3628 3627 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="asctime-date"/> 3629 3628 <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> 3630 3629 <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> )) 3631 ; month day (e.g., Jun 2)3630 ; e.g., Jun 2 3632 3631 </artwork></figure> 3633 3632 <t> … … 3635 3634 A sender &MUST-NOT; generate additional whitespace in an HTTP-date beyond 3636 3635 that specifically included as SP in the grammar. 3637 </t> 3638 <t> 3639 Recipients that parse a date value &MUST; accept all three formats (for 3640 compatibility with HTTP/1.0). A sender &MUST; only generate the RFC 1123 3641 format when sending HTTP-date values in header fields. 3642 </t> 3643 <x:note> 3644 <t> 3645 &Note; Recipients of date values are encouraged to be robust in 3646 accepting date values that might have been sent by non-HTTP 3647 applications, as is sometimes the case when retrieving or posting 3648 messages via proxies/gateways to SMTP or NNTP. 3649 </t> 3650 </x:note> 3636 The semantics of <x:ref>day-name</x:ref>, <x:ref>day</x:ref>, 3637 <x:ref>month</x:ref>, <x:ref>year</x:ref>, and <x:ref>time-of-day</x:ref> 3638 are the same as those defined for the Internet Message Format constructs 3639 with the corresponding name (<xref target="RFC5322" x:fmt="," x:sec="3.3"/>). 3640 </t> 3641 <t> 3642 Recipients of a timestamp value in rfc850-date format, which uses a 3643 two-digit year, &SHOULD; interpret a timestamp that appears to be more 3644 than 50 years in the future as representing the most recent year in the 3645 past that had the same last two digits. 3646 </t> 3647 <t> 3648 Recipients of timestamp values are encouraged to be robust in parsing 3649 timestamps unless otherwise restricted by the field definition. 3650 For example, messages are occasionally forwarded over HTTP from a non-HTTP 3651 source that might generate any of the date and time specifications defined 3652 by the Internet Message Format. 3653 </t> 3651 3654 <x:note> 3652 3655 <t> 3653 3656 &Note; HTTP requirements for the date/time stamp format apply only 3654 to their usage within the protocol stream. Clients and servers are3657 to their usage within the protocol stream. Implementations are 3655 3658 not required to use these formats for user presentation, request 3656 3659 logging, etc. … … 3666 3669 the message was originated, having the same semantics as the Origination 3667 3670 Date Field (orig-date) defined in <xref target="RFC5322" x:fmt="of" x:sec="3.6.1"/>. 3668 The field value is an HTTP-date, as defined in <xref target="http.date"/>, 3669 though a sender &MUST; generate a Date value in the rfc1123-date format. 3671 The field value is an HTTP-date, as defined in <xref target="http.date"/>. 3670 3672 </t> 3671 3673 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Date"/> … … 3687 3689 <t> 3688 3690 An origin server &MUST-NOT; send a Date header field if it does not have a 3689 clock capable of providing a reasonable approximation of the current time. 3691 clock capable of providing a reasonable approximation of the current 3692 instance in Coordinated Universal Time. 3690 3693 An origin server &MAY; send a Date header field if the response is in the 3691 3694 <x:ref>1xx (Informational)</x:ref> or <x:ref>5xx (Server Error)</x:ref> … … 5198 5201 </reference> 5199 5202 5200 <reference anchor="RFC1123"> 5201 <front> 5202 <title>Requirements for Internet Hosts - Application and Support</title> 5203 <author initials="R." surname="Braden" fullname="Robert Braden"> 5204 <organization>University of Southern California (USC), Information Sciences Institute</organization> 5205 <address><email>Braden@ISI.EDU</email></address> 5206 </author> 5207 <date month="October" year="1989"/> 5208 </front> 5209 <seriesInfo name="STD" value="3"/> 5210 <seriesInfo name="RFC" value="1123"/> 5203 <reference anchor="RFC1305"> 5204 <front> 5205 <title>Network Time Protocol (Version 3) Specification, Implementation</title> 5206 <author fullname="David L. Mills" initials="D." surname="Mills"> 5207 <organization>University of Delaware, Electrical Engineering Department</organization> 5208 <address><email>mills@udel.edu</email></address> 5209 </author> 5210 <date month="March" year="1992" /> 5211 </front> 5212 <seriesInfo name="RFC" value="1305" /> 5211 5213 </reference> 5212 5214 … … 5993 5995 <x:ref>GMT</x:ref> = %x47.4D.54 ; GMT 5994 5996 5995 <x:ref>HTTP-date</x:ref> = rfc1123-date / obs-date 5997 <x:ref>HTTP-date</x:ref> = IMF-fixdate / obs-date 5998 5999 <x:ref>IMF-fixdate</x:ref> = day-name "," SP date1 SP time-of-day SP GMT 5996 6000 5997 6001 <x:ref>Location</x:ref> = URI-reference … … 6087 6091 <x:ref>qvalue</x:ref> = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] ) 6088 6092 6089 <x:ref>rfc1123-date</x:ref> = day-name "," SP date1 SP time-of-day SP GMT6090 6093 <x:ref>rfc850-date</x:ref> = day-name-l "," SP date2 SP time-of-day SP GMT 6091 6094
Note: See TracChangeset
for help on using the changeset viewer.