Changeset 1436 for draft-ietf-httpbis/latest/p2-semantics.xml
- Timestamp:
- 03/09/11 01:55:23 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p2-semantics.xml
r1435 r1436 33 33 <!ENTITY intermediaries "<xref target='Part1' x:rel='#intermediaries' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 34 34 <!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'/>">36 35 <!ENTITY http-url "<xref target='Part1' x:rel='#http-url' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 37 36 <!ENTITY http-version "<xref target='Part1' x:rel='#http.version' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> … … 361 360 <x:anchor-alias value="absolute-URI"/> 362 361 <x:anchor-alias value="comment"/> 363 <x:anchor-alias value="HTTP-date"/>364 362 <x:anchor-alias value="partial-URI"/> 365 363 <x:anchor-alias value="product"/> … … 371 369 <x:ref>absolute-URI</x:ref> = <absolute-URI, defined in &uri;> 372 370 <x:ref>comment</x:ref> = <comment, defined in &header-fields;> 373 <x:ref>HTTP-date</x:ref> = <HTTP-date, defined in &full-date;>374 371 <x:ref>partial-URI</x:ref> = <partial-URI, defined in &uri;> 375 372 <x:ref>product</x:ref> = <product, defined in &product-tokens;> … … 594 591 <c>Age</c> <c>&header-age;</c> 595 592 <c>Allow</c> <c><xref target="header.allow"/></c> 593 <c>Date</c> <c><xref target="header.date"/></c> 596 594 <c>ETag</c> <c>&header-etag;</c> 597 595 <c>Location</c> <c><xref target="header.location"/></c> … … 2280 2278 2281 2279 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=" "> 2288 Sun, 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=" "> 2295 Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format 2296 Sun 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 2282 2427 <section title="Header Field Definitions" anchor="header.field.definitions"> 2283 2428 <t> … … 2312 2457 understand all the methods specified in order to handle them according to 2313 2458 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. 2314 2519 </t> 2315 2520 </section> … … 2955 3160 <c> 2956 3161 <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"/> 2957 3168 </c> 2958 3169 <c>Expect</c> … … 3484 3695 <references title="Informative References"> 3485 3696 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 3486 3710 <reference anchor="RFC1945"> 3487 3711 <front> … … 3754 3978 <x:ref>Allow</x:ref> = [ ( "," / Method ) *( OWS "," [ OWS Method ] ) ] 3755 3979 3980 <x:ref>Date</x:ref> = HTTP-date 3981 3756 3982 <x:ref>Expect</x:ref> = *( "," OWS ) expectation *( OWS "," [ OWS expectation ] ) 3757 3983 3758 3984 <x:ref>From</x:ref> = mailbox 3759 3985 3760 <x:ref>HTTP-date</x:ref> = <HTTP-date, defined in [Part1], Section 5.1> 3986 <x:ref>GMT</x:ref> = %x47.4D.54 ; GMT 3987 3988 <x:ref>HTTP-date</x:ref> = rfc1123-date / obs-date 3761 3989 3762 3990 <x:ref>Location</x:ref> = URI-reference … … 3779 4007 3780 4008 <x:ref>absolute-URI</x:ref> = <absolute-URI, defined in [Part1], Section 2.7> 4009 <x:ref>asctime-date</x:ref> = day-name SP date3 SP time-of-day SP year 3781 4010 3782 4011 <x:ref>comment</x:ref> = <comment, defined in [Part1], Section 3.2> 3783 4012 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 3784 4031 <x:ref>delta-seconds</x:ref> = 1*DIGIT 3785 4032 … … 3789 4036 *expect-params ] 3790 4037 4038 <x:ref>hour</x:ref> = 2DIGIT 4039 3791 4040 <x:ref>mailbox</x:ref> = <mailbox, defined in [RFC5322], Section 3.4> 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 3793 4056 <x:ref>obs-text</x:ref> = <obs-text, defined in [Part1], Section 1.2.2> 3794 4057 3795 4058 <x:ref>partial-URI</x:ref> = <partial-URI, defined in [Part1], Section 2.7> 3796 <x:ref>product</x:ref> = <product, defined in [Part1], Section 5. 3>4059 <x:ref>product</x:ref> = <product, defined in [Part1], Section 5.2> 3797 4060 3798 4061 <x:ref>quoted-string</x:ref> = <quoted-string, defined in [Part1], Section 3.2.3> 3799 4062 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 3800 4069 <x:ref>token</x:ref> = <token, defined in [Part1], Section 3.2.3> 4070 4071 <x:ref>year</x:ref> = 4DIGIT 3801 4072 </artwork> 3802 4073 </figure> 3803 4074 <figure><preamble>ABNF diagnostics:</preamble><artwork type="inline"> 3804 4075 ; Allow defined but not used 4076 ; Date defined but not used 3805 4077 ; Expect defined but not used 3806 4078 ; From defined but not used
Note: See TracChangeset
for help on using the changeset viewer.