Ignore:
Timestamp:
May 10, 2009, 3:42:16 AM (10 years ago)
Author:
julian.reschke@…
Message:

re-organize section on HTTP-date including ABNF, refer to RFC 5322 for semantics (related to #163)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p1-messaging.xml

    r578 r580  
    836836</section>
    837837
    838 <section title="Date/Time Formats" anchor="date.time.formats">
    839 <section title="Full Date" anchor="full.date">
     838<section title="Date/Time Formats: Full Date" anchor="date.time.formats.full.date">
    840839  <x:anchor-alias value="HTTP-date"/>
    841   <x:anchor-alias value="obsolete-date"/>
    842   <x:anchor-alias value="rfc1123-date"/>
    843   <x:anchor-alias value="rfc850-date"/>
    844   <x:anchor-alias value="asctime-date"/>
    845   <x:anchor-alias value="date1"/>
    846   <x:anchor-alias value="date2"/>
    847   <x:anchor-alias value="date3"/>
    848   <x:anchor-alias value="rfc1123-date"/>
    849   <x:anchor-alias value="time"/>
    850   <x:anchor-alias value="wkday"/>
    851   <x:anchor-alias value="weekday"/>
    852   <x:anchor-alias value="month"/>
    853840<t>
    854841   HTTP applications have historically allowed three different formats
     
    870857   in header fields. See <xref target="tolerant.applications"/> for further information.
    871858</t>
    872 <x:note>
    873   <t>
    874     <x:h>Note:</x:h> Recipients of date values are encouraged to be robust in
    875     accepting date values that may have been sent by non-HTTP
    876     applications, as is sometimes the case when retrieving or posting
    877     messages via proxies/gateways to SMTP or NNTP.
    878   </t>
    879 </x:note>
    880859<t>
    881860   All HTTP date/time stamps &MUST; be represented in Greenwich Mean Time
     
    888867   grammar.
    889868</t>
    890 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/><iref primary="true" item="Grammar" subitem="rfc1123-date"/><iref primary="true" item="Grammar" subitem="obsolete-date"/><iref primary="true" item="Grammar" subitem="rfc850-date"/><iref primary="true" item="Grammar" subitem="asctime-date"/><iref primary="true" item="Grammar" subitem="date1"/><iref primary="true" item="Grammar" subitem="date2"/><iref primary="true" item="Grammar" subitem="date3"/><iref primary="true" item="Grammar" subitem="time"/><iref primary="true" item="Grammar" subitem="wkday"/><iref primary="true" item="Grammar" subitem="weekday"/><iref primary="true" item="Grammar" subitem="month"/>
    891   <x:ref>HTTP-date</x:ref>    = <x:ref>rfc1123-date</x:ref> / <x:ref>obsolete-date</x:ref>
    892   <x:ref>obsolete-date</x:ref> = <x:ref>rfc850-date</x:ref> / <x:ref>asctime-date</x:ref>
    893   <x:ref>rfc1123-date</x:ref> = <x:ref>wkday</x:ref> "," <x:ref>SP</x:ref> date1 <x:ref>SP</x:ref> time <x:ref>SP</x:ref> GMT
    894   <x:ref>rfc850-date</x:ref>  = <x:ref>weekday</x:ref> "," <x:ref>SP</x:ref> date2 <x:ref>SP</x:ref> time <x:ref>SP</x:ref> GMT
    895   <x:ref>asctime-date</x:ref> = <x:ref>wkday</x:ref> <x:ref>SP</x:ref> <x:ref>date3</x:ref> <x:ref>SP</x:ref> <x:ref>time</x:ref> <x:ref>SP</x:ref> 4<x:ref>DIGIT</x:ref>
    896   <x:ref>date1</x:ref>        = 2<x:ref>DIGIT</x:ref> <x:ref>SP</x:ref> <x:ref>month</x:ref> <x:ref>SP</x:ref> 4<x:ref>DIGIT</x:ref>
    897                  ; day month year (e.g., 02 Jun 1982)
    898   <x:ref>date2</x:ref>        = 2<x:ref>DIGIT</x:ref> "-" <x:ref>month</x:ref> "-" 2<x:ref>DIGIT</x:ref>
    899                  ; day-month-year (e.g., 02-Jun-82)
    900   <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> ))
    901                  ; month day (e.g., Jun  2)
    902   <x:ref>time</x:ref>         = 2<x:ref>DIGIT</x:ref> ":" 2<x:ref>DIGIT</x:ref> ":" 2<x:ref>DIGIT</x:ref>
    903                  ; 00:00:00 - 23:59:59
    904   <x:ref>wkday</x:ref>        = s-Mon / s-Tue / s-Wed
     869<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="HTTP-date"/>
     870  <x:ref>HTTP-date</x:ref>    = <x:ref>rfc1123-date</x:ref> / <x:ref>obs-date</x:ref>
     871</artwork></figure>
     872<t anchor="preferred.date.format">
     873  <x:anchor-alias value="rfc1123-date"/>
     874  <x:anchor-alias value="time-of-day"/>
     875  <x:anchor-alias value="hour"/>
     876  <x:anchor-alias value="minute"/>
     877  <x:anchor-alias value="second"/>
     878  <x:anchor-alias value="day-name"/>
     879  <x:anchor-alias value="day"/>
     880  <x:anchor-alias value="month"/>
     881  <x:anchor-alias value="year"/>
     882  <x:anchor-alias value="GMT"/>
     883  Preferred format:
     884</t>
     885<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"/>
     886  <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>
     887
     888  <x:ref>day-name</x:ref>     = s-Mon / s-Tue / s-Wed
    905889               / s-Thu / s-Fri / s-Sat / s-Sun
    906   <x:ref>weekday</x:ref>      = l-Mon / l-Tue / l-Wed
    907                / l-Thu / l-Fri / l-Sat / l-Sun
    908   <x:ref>month</x:ref>        = s-Jan / s-Feb / s-Mar / s-Apr
    909                / s-May / s-Jun / s-Jul / s-Aug
    910                / s-Sep / s-Oct / s-Nov / s-Dec
    911890               
    912   GMT   = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive
    913 
    914891  s-Mon = <x:abnf-char-sequence>"Mon"</x:abnf-char-sequence> ; "Mon", case-sensitive
    915892  s-Tue = <x:abnf-char-sequence>"Tue"</x:abnf-char-sequence> ; "Tue", case-sensitive
     
    920897  s-Sun = <x:abnf-char-sequence>"Sun"</x:abnf-char-sequence> ; "Sun", case-sensitive
    921898
    922   l-Mon = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence>          ; "Monday", case-sensitive
    923   l-Tue = <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence>       ; "Tuesday", case-sensitive
    924   l-Wed = <x:abnf-char-sequence>"Wednesday"</x:abnf-char-sequence> ; "Wednesday", case-sensitive
    925   l-Thu = <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence>    ; "Thursday", case-sensitive
    926   l-Fri = <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence>          ; "Friday", case-sensitive
    927   l-Sat = <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence>    ; "Saturday", case-sensitive
    928   l-Sun = <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence>          ; "Sunday", case-sensitive
     899  <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>
     900               ; e.g., 02 Jun 1982
     901
     902  <x:ref>day</x:ref>          = 2<x:ref>DIGIT</x:ref>
     903  <x:ref>month</x:ref>        = s-Jan / s-Feb / s-Mar / s-Apr
     904               / s-May / s-Jun / s-Jul / s-Aug
     905               / s-Sep / s-Oct / s-Nov / s-Dec
     906  <x:ref>year</x:ref>         = 4<x:ref>DIGIT</x:ref>
    929907
    930908  s-Jan = <x:abnf-char-sequence>"Jan"</x:abnf-char-sequence> ; "Jan", case-sensitive
     
    940918  s-Nov = <x:abnf-char-sequence>"Nov"</x:abnf-char-sequence> ; "Nov", case-sensitive
    941919  s-Dec = <x:abnf-char-sequence>"Dec"</x:abnf-char-sequence> ; "Dec", case-sensitive
    942 </artwork></figure>
    943 <t>
    944       <x:h>Note:</x:h> HTTP requirements for the date/time stamp format apply only
    945       to their usage within the protocol stream. Clients and servers are
    946       not required to use these formats for user presentation, request
    947       logging, etc.
    948 </t>
    949 </section>
     920
     921  <x:ref>GMT</x:ref>   = <x:abnf-char-sequence>"GMT"</x:abnf-char-sequence> ; "GMT", case-sensitive
     922
     923  <x:ref>time-of-day</x:ref>  = <x:ref>hour</x:ref> ":" <x:ref>minute</x:ref> ":" <x:ref>second</x:ref>
     924                 ; 00:00:00 - 23:59:59
     925                 
     926  <x:ref>hour</x:ref>         = 2<x:ref>DIGIT</x:ref>               
     927  <x:ref>minute</x:ref>       = 2<x:ref>DIGIT</x:ref>               
     928  <x:ref>second</x:ref>       = 2<x:ref>DIGIT</x:ref>               
     929</artwork></figure>
     930<t>
     931  The semantics of <x:ref>day-name</x:ref>, <x:ref>day</x:ref>,
     932  <x:ref>month</x:ref>, <x:ref>year</x:ref>, and <x:ref>time-of-day</x:ref> are the
     933  same as those defined in the RFC 5322 constructs
     934  with the corresponding name (<xref target="RFC5322" x:fmt="," x:sec="3.3"/>).
     935</t>
     936<t anchor="obsolete.date.formats">
     937  <x:anchor-alias value="obs-date"/>
     938  <x:anchor-alias value="rfc850-date"/>
     939  <x:anchor-alias value="asctime-date"/>
     940  <x:anchor-alias value="date1"/>
     941  <x:anchor-alias value="date2"/>
     942  <x:anchor-alias value="date3"/>
     943  <x:anchor-alias value="rfc1123-date"/>
     944  <x:anchor-alias value="day-name-l"/>
     945  Obsolete formats:
     946</t>
     947<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="obs-date"/>
     948  <x:ref>obs-date</x:ref>     = <x:ref>rfc850-date</x:ref> / <x:ref>asctime-date</x:ref>
     949</artwork></figure>
     950<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="rfc850-date"/>
     951  <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>
     952  <x:ref>date2</x:ref>        = <x:ref>day</x:ref> "-" <x:ref>month</x:ref> "-" 2<x:ref>DIGIT</x:ref>
     953                 ; day-month-year (e.g., 02-Jun-82)
     954
     955  <x:ref>day-name-l</x:ref>   = l-Mon / l-Tue / l-Wed
     956               / l-Thu / l-Fri / l-Sat / l-Sun
     957
     958  l-Mon = <x:abnf-char-sequence>"Monday"</x:abnf-char-sequence>          ; "Monday", case-sensitive
     959  l-Tue = <x:abnf-char-sequence>"Tuesday"</x:abnf-char-sequence>       ; "Tuesday", case-sensitive
     960  l-Wed = <x:abnf-char-sequence>"Wednesday"</x:abnf-char-sequence> ; "Wednesday", case-sensitive
     961  l-Thu = <x:abnf-char-sequence>"Thursday"</x:abnf-char-sequence>    ; "Thursday", case-sensitive
     962  l-Fri = <x:abnf-char-sequence>"Friday"</x:abnf-char-sequence>          ; "Friday", case-sensitive
     963  l-Sat = <x:abnf-char-sequence>"Saturday"</x:abnf-char-sequence>    ; "Saturday", case-sensitive
     964  l-Sun = <x:abnf-char-sequence>"Sunday"</x:abnf-char-sequence>          ; "Sunday", case-sensitive
     965</artwork></figure>
     966<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="asctime-date"/>
     967  <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>
     968  <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> ))
     969                 ; month day (e.g., Jun  2)
     970</artwork></figure>
     971<x:note>
     972  <t>
     973    <x:h>Note:</x:h> Recipients of date values are encouraged to be robust in
     974    accepting date values that may have been sent by non-HTTP
     975    applications, as is sometimes the case when retrieving or posting
     976    messages via proxies/gateways to SMTP or NNTP.
     977  </t>
     978</x:note>
     979<x:note>
     980  <t>
     981    <x:h>Note:</x:h> HTTP requirements for the date/time stamp format apply only
     982    to their usage within the protocol stream. Clients and servers are
     983    not required to use these formats for user presentation, request
     984    logging, etc.
     985  </t>
     986</x:note>
    950987</section>
    951988
     
    9711008   Parameters are in  the form of attribute/value pairs.
    9721009</t>
    973 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="parameter"/><iref primary="true" item="Grammar" subitem="attribute"/><iref primary="true" item="Grammar" subitem="value"/>
     1010<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="parameter"/><iref primary="true" item="Grammar" subitem="attribute"/><iref primary="true" item="Grammar" subitem="value"/><iref primary="true" item="Grammar" subitem="date2"/><iref primary="true" item="Grammar" subitem="date3"/>
    9741011  <x:ref>parameter</x:ref>               = <x:ref>attribute</x:ref> <x:ref>BWS</x:ref> "=" <x:ref>BWS</x:ref> <x:ref>value</x:ref>
    9751012  <x:ref>attribute</x:ref>               = <x:ref>token</x:ref>
     
    22852322   the message was originated, having the same semantics as orig-date in
    22862323   <xref target="RFC5322" x:fmt="of" x:sec="3.6.1"/>. The field value is an
    2287    HTTP-date, as described in <xref target="full.date"/>;
     2324   HTTP-date, as described in <xref target="date.time.formats.full.date"/>;
    22882325   it &MUST; be sent in rfc1123-date format.
    22892326</t>
     
    43624399<x:ref>Date-v</x:ref> = HTTP-date
    43634400
    4364 GMT = %x47.4D.54
     4401<x:ref>GMT</x:ref> = %x47.4D.54
    43654402
    43664403<x:ref>HTTP-Prot-Name</x:ref> = %x48.54.54.50
    43674404<x:ref>HTTP-Version</x:ref> = HTTP-Prot-Name "/" 1*DIGIT "." 1*DIGIT
    4368 <x:ref>HTTP-date</x:ref> = rfc1123-date / obsolete-date
     4405<x:ref>HTTP-date</x:ref> = rfc1123-date / obs-date
    43694406<x:ref>HTTP-message</x:ref> = Request / Response
    43704407<x:ref>Host</x:ref> = "Host:" OWS Host-v
     
    44094446
    44104447<x:ref>absolute-URI</x:ref> = &lt;absolute-URI, defined in [RFC3986], Section 4.3&gt;
    4411 <x:ref>asctime-date</x:ref> = wkday SP date3 SP time SP 4DIGIT
     4448<x:ref>asctime-date</x:ref> = day-name SP date3 SP time-of-day SP year
    44124449<x:ref>attribute</x:ref> = token
    44134450<x:ref>authority</x:ref> = &lt;authority, defined in [RFC3986], Section 3.2&gt;
     
    44234460<x:ref>ctext</x:ref> = OWS / %x21-27 / %x2A-5B / %x5D-7E / obs-text
    44244461
    4425 <x:ref>date1</x:ref> = 2DIGIT SP month SP 4DIGIT
    4426 <x:ref>date2</x:ref> = 2DIGIT "-" month "-" 2DIGIT
     4462<x:ref>date1</x:ref> = day SP month SP year
     4463<x:ref>date2</x:ref> = day "-" month "-" 2DIGIT
    44274464<x:ref>date3</x:ref> = month SP ( 2DIGIT / ( SP DIGIT ) )
     4465<x:ref>day</x:ref> = 2DIGIT
     4466<x:ref>day-name</x:ref> = s-Mon / s-Tue / s-Wed / s-Thu / s-Fri / s-Sat / s-Sun
     4467<x:ref>day-name-l</x:ref> = l-Mon / l-Tue / l-Wed / l-Thu / l-Fri / l-Sat / l-Sun
    44284468
    44294469<x:ref>entity-body</x:ref> = &lt;entity-body, defined in [Part3], Section 3.2&gt;
     
    44404480 message-body ]
    44414481
     4482<x:ref>hour</x:ref> = 2DIGIT
    44424483<x:ref>http-URI</x:ref> = "http://" authority path-abempty [ "?" query ]
    44434484
     
    44544495 &lt;entity-body encoded as per Transfer-Encoding&gt;
    44554496<x:ref>message-header</x:ref> = field-name ":" OWS [ field-value ] OWS
     4497<x:ref>minute</x:ref> = 2DIGIT
    44564498<x:ref>month</x:ref> = s-Jan / s-Feb / s-Mar / s-Apr / s-May / s-Jun / s-Jul / s-Aug
    44574499 / s-Sep / s-Oct / s-Nov / s-Dec
    44584500
     4501<x:ref>obs-date</x:ref> = rfc850-date / asctime-date
    44594502<x:ref>obs-fold</x:ref> = CRLF
    44604503<x:ref>obs-text</x:ref> = %x80-FF
    4461 <x:ref>obsolete-date</x:ref> = rfc850-date / asctime-date
    44624504
    44634505<x:ref>parameter</x:ref> = attribute BWS "=" BWS value
     
    44864528 / authority
    44874529<x:ref>response-header</x:ref> = &lt;response-header, defined in [Part2], Section 5&gt;
    4488 <x:ref>rfc1123-date</x:ref> = wkday "," SP date1 SP time SP GMT
    4489 <x:ref>rfc850-date</x:ref> = weekday "," SP date2 SP time SP GMT
     4530<x:ref>rfc1123-date</x:ref> = day-name "," SP date1 SP time-of-day SP GMT
     4531<x:ref>rfc850-date</x:ref> = day-name-l "," SP date2 SP time-of-day SP GMT
    44904532
    44914533s-Apr = %x41.70.72
     
    45084550s-Tue = %x54.75.65
    45094551s-Wed = %x57.65.64
     4552<x:ref>second</x:ref> = 2DIGIT
    45104553<x:ref>start-line</x:ref> = Request-Line / Status-Line
    45114554
     
    45154558<x:ref>te-ext</x:ref> = OWS ";" OWS token [ "=" ( token / quoted-string ) ]
    45164559<x:ref>te-params</x:ref> = OWS ";" OWS "q=" qvalue *te-ext
    4517 <x:ref>time</x:ref> = 2DIGIT ":" 2DIGIT ":" 2DIGIT
     4560<x:ref>time-of-day</x:ref> = hour ":" minute ":" second
    45184561<x:ref>token</x:ref> = 1*tchar
    45194562<x:ref>trailer-part</x:ref> = *( entity-header CRLF )
     
    45254568<x:ref>value</x:ref> = token / quoted-string
    45264569
    4527 <x:ref>weekday</x:ref> = l-Mon / l-Tue / l-Wed / l-Thu / l-Fri / l-Sat / l-Sun
    4528 <x:ref>wkday</x:ref> = s-Mon / s-Tue / s-Wed / s-Thu / s-Fri / s-Sat / s-Sun
     4570<x:ref>year</x:ref> = 4DIGIT
    45294571
    45304572
     
    49194961  </list>
    49204962</t>
     4963<t>
     4964  Partly resolved issues:
     4965  <list style="symbols">
     4966    <t>
     4967      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/163"/>:
     4968      "editorial improvements around HTTP-date"
     4969    </t>
     4970  </list>
     4971</t>
    49214972</section>
    49224973
Note: See TracChangeset for help on using the changeset viewer.