Ignore:
Timestamp:
Nov 13, 2008, 7:47:23 AM (11 years ago)
Author:
julian.reschke@…
Message:

Rewrite header ABNFs to spell out whitespace rules, factor out value format definitions. (related to #36)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p4-conditional.xml

    r345 r362  
    253253<section title="Notational Conventions and Generic Grammar" anchor="notation">
    254254  <x:anchor-alias value="quoted-string"/>
     255  <x:anchor-alias value="BWS"/>
     256  <x:anchor-alias value="OWS"/>
     257  <x:anchor-alias value="RWS"/>
    255258<t>
    256259  This specification uses the ABNF syntax defined in &notation-abnf; and
     
    261264<figure><artwork type="abnf2616">
    262265  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &basic-rules;&gt;
     266  <x:ref>BWS</x:ref>           = &lt;BWS, defined in &basic-rules;&gt;
     267  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &basic-rules;&gt;
     268  <x:ref>RWS</x:ref>           = &lt;RWS, defined in &basic-rules;&gt;
    263269</artwork></figure>
    264270<t anchor="abnf.dependencies">
     
    650656  <iref primary="true" item="Headers" subitem="ETag" x:for-anchor=""/>
    651657  <x:anchor-alias value="ETag"/>
    652 <t>
    653    The ETag response-header field provides the current value of the
     658  <x:anchor-alias value="ETag-v"/>
     659<t>
     660   The response-header field "ETag" provides the current value of the
    654661   entity tag (see <xref target="entity.tags"/>) for the requested variant.
    655662   The headers used with entity
     
    660667   (see <xref target="weak.and.strong.validators"/>).
    661668</t>
    662 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="ETag"/>
    663   <x:ref>ETag</x:ref> = "ETag" ":" <x:ref>entity-tag</x:ref>
     669<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="ETag"/><iref primary="true" item="Grammar" subitem="ETag-v"/>
     670  <x:ref>ETag</x:ref>   = "ETag" <x:ref>BWS</x:ref> ":" <x:ref>OWS</x:ref> <x:ref>ETag-v</x:ref>
     671  <x:ref>ETag-v</x:ref> = <x:ref>entity-tag</x:ref>
    664672</artwork></figure>
    665673<figure><preamble>
    666    Examples:
     674  Examples:
    667675</preamble>
    668676<artwork type="example">
    669    ETag: "xyzzy"
    670    ETag: W/"xyzzy"
    671    ETag: ""
     677  ETag: "xyzzy"
     678  ETag: W/"xyzzy"
     679  ETag: ""
    672680</artwork></figure>
    673681<t>
     
    694702  <iref primary="true" item="Headers" subitem="If-Match" x:for-anchor=""/>
    695703  <x:anchor-alias value="If-Match"/>
    696 <t>
    697    The If-Match request-header field is used with a method to make it
     704  <x:anchor-alias value="If-Match-v"/>
     705<t>
     706   The request-header field "If-Match" is used with a method to make it
    698707   conditional. A client that has one or more entities previously
    699708   obtained from the resource can verify that one of those entities is
     
    706715   matches any current entity of the resource.
    707716</t>
    708 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Match"/>
    709   <x:ref>If-Match</x:ref> = "If-Match" ":" ( "*" / 1#<x:ref>entity-tag</x:ref> )
     717<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Match"/><iref primary="true" item="Grammar" subitem="If-Match-v"/>
     718  <x:ref>If-Match</x:ref>   = "If-Match" <x:ref>BWS</x:ref> ":" <x:ref>OWS</x:ref> <x:ref>If-Match-v</x:ref>
     719  <x:ref>If-Match-v</x:ref> = "*" / 1#<x:ref>entity-tag</x:ref>
    710720</artwork></figure>
    711721<t>
     
    750760</t>
    751761<figure><artwork type="example">
    752     If-Match: "xyzzy"
    753     If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
    754     If-Match: *
     762  If-Match: "xyzzy"
     763  If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
     764  If-Match: *
    755765</artwork></figure>
    756766<t>
     
    765775  <iref primary="true" item="Headers" subitem="If-Modified-Since" x:for-anchor=""/>
    766776  <x:anchor-alias value="If-Modified-Since"/>
    767 <t>
    768    The If-Modified-Since request-header field is used with a method to
     777  <x:anchor-alias value="If-Modified-Since-v"/>
     778<t>
     779   The request-header field "If-Modified-Since" is used with a method to
    769780   make it conditional: if the requested variant has not been modified
    770781   since the time specified in this field, an entity will not be
     
    772783   be returned without any message-body.
    773784</t>
    774 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Modified-Since"/>
    775   <x:ref>If-Modified-Since</x:ref> = "If-Modified-Since" ":" <x:ref>HTTP-date</x:ref>
     785<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Modified-Since"/><iref primary="true" item="Grammar" subitem="If-Modified-Since-v"/>
     786  <x:ref>If-Modified-Since</x:ref>   = "If-Modified-Since" <x:ref>BWS</x:ref> ":" <x:ref>OWS</x:ref> <x:ref>If-Modified-Since-v</x:ref>
     787  <x:ref>If-Modified-Since-v</x:ref> = <x:ref>HTTP-date</x:ref>
    776788</artwork></figure>
    777789<t>
     
    779791</t>
    780792<figure><artwork type="example">
    781     If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
     793  If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
    782794</artwork></figure>
    783795<t>
     
    847859  <iref primary="true" item="Headers" subitem="If-None-Match" x:for-anchor=""/>
    848860  <x:anchor-alias value="If-None-Match"/>
    849 <t>
    850    The If-None-Match request-header field is used with a method to make
     861  <x:anchor-alias value="If-None-Match-v"/>
     862<t>
     863   The request-header field "If-None-Match" is used with a method to make
    851864   it conditional. A client that has one or more entities previously
    852865   obtained from the resource can verify that none of those entities is
     
    862875   resource.
    863876</t>
    864 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-None-Match"/>
    865   <x:ref>If-None-Match</x:ref> = "If-None-Match" ":" ( "*" / 1#<x:ref>entity-tag</x:ref> )
     877<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-None-Match"/><iref primary="true" item="Grammar" subitem="If-None-Match-v"/>
     878  <x:ref>If-None-Match</x:ref>   = "If-None-Match" <x:ref>BWS</x:ref> ":" <x:ref>OWS</x:ref> <x:ref>If-None-Match-v</x:ref>
     879  <x:ref>If-None-Match-v</x:ref> = "*" / 1#<x:ref>entity-tag</x:ref>
    866880</artwork></figure>
    867881<t>
     
    909923</t>
    910924<figure><artwork type="example">
    911     If-None-Match: "xyzzy"
    912     If-None-Match: W/"xyzzy"
    913     If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
    914     If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
    915     If-None-Match: *
     925  If-None-Match: "xyzzy"
     926  If-None-Match: W/"xyzzy"
     927  If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
     928  If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
     929  If-None-Match: *
    916930</artwork></figure>
    917931<t>
     
    926940  <iref primary="true" item="Headers" subitem="If-Unmodified-Since" x:for-anchor=""/>
    927941  <x:anchor-alias value="If-Unmodified-Since"/>
    928 <t>
    929    The If-Unmodified-Since request-header field is used with a method to
     942  <x:anchor-alias value="If-Unmodified-Since-v"/>
     943<t>
     944   The request-header field "If-Unmodified-Since" is used with a method to
    930945   make it conditional. If the requested resource has not been modified
    931946   since the time specified in this field, the server &SHOULD; perform the
     
    938953   a 412 (Precondition Failed).
    939954</t>
    940 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/>
    941   <x:ref>If-Unmodified-Since</x:ref> = "If-Unmodified-Since" ":" <x:ref>HTTP-date</x:ref>
     955<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/><iref primary="true" item="Grammar" subitem="If-Unmodified-Since-v"/>
     956  <x:ref>If-Unmodified-Since</x:ref>   = "If-Unmodified-Since" <x:ref>BWS</x:ref> ":" <x:ref>OWS</x:ref> <x:ref>If-Unmodified-Since-v</x:ref>
     957  <x:ref>If-Unmodified-Since-v</x:ref> = <x:ref>HTTP-date</x:ref>
    942958</artwork></figure>
    943959<t>
     
    945961</t>
    946962<figure><artwork type="example">
    947     If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
     963  If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
    948964</artwork></figure>
    949965<t>
     
    966982  <iref primary="true" item="Headers" subitem="Last-Modified" x:for-anchor=""/>
    967983  <x:anchor-alias value="Last-Modified"/>
    968 <t>
    969    The Last-Modified entity-header field indicates the date and time at
     984  <x:anchor-alias value="Last-Modified-v"/>
     985<t>
     986   The entity-header field "Last-Modified" indicates the date and time at
    970987   which the origin server believes the variant was last modified.
    971988</t>
    972 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Last-Modified"/>
    973   <x:ref>Last-Modified</x:ref>  = "Last-Modified" ":" <x:ref>HTTP-date</x:ref>
     989<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Last-Modified"/><iref primary="true" item="Grammar" subitem="Last-Modified-v"/>
     990  <x:ref>Last-Modified</x:ref>   = "Last-Modified" <x:ref>BWS</x:ref> ":" <x:ref>OWS</x:ref> <x:ref>Last-Modified-v</x:ref>
     991  <x:ref>Last-Modified-v</x:ref> = <x:ref>HTTP-date</x:ref>
    974992</artwork></figure>
    975993<t>
     
    977995</t>
    978996<figure><artwork type="example">
    979     Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
     997  Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
    980998</artwork></figure>
    981999<t>
     
    13951413      Use "/" instead of "|" for alternatives.
    13961414    </t>
     1415    <t>
     1416      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
     1417      whitespace ("OWS") and required whitespace ("RWS").
     1418    </t>
     1419    <t>
     1420      Rewrite ABNFs to spell out whitespace rules, factor out
     1421      header value format definitions.
     1422    </t>
    13971423  </list>
    13981424</t>
Note: See TracChangeset for help on using the changeset viewer.