Ignore:
Timestamp:
Nov 13, 2008, 10:53:12 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/p1-messaging.html

    r360 r366  
    10311031      </p>
    10321032      <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.37"></span><span id="rfc.iref.g.38"></span>  <a href="#transfer.codings" class="smpl">transfer-coding</a>         = "chunked" / <a href="#transfer.codings" class="smpl">transfer-extension</a>
    1033   <a href="#transfer.codings" class="smpl">transfer-extension</a>      = <a href="#rule.token.separators" class="smpl">token</a> *( OWS ";" OWS <a href="#transfer.codings" class="smpl">parameter</a> )
     1033  <a href="#transfer.codings" class="smpl">transfer-extension</a>      = <a href="#rule.token.separators" class="smpl">token</a> *( <a href="#rule.whitespace" class="smpl">OWS</a> ";" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#transfer.codings" class="smpl">parameter</a> )
    10341034</pre><div id="rule.parameter">
    10351035         <p id="rfc.section.3.4.p.3">      Parameters are in the form of attribute/value pairs.</p>
    10361036      </div>
    1037       <div id="rfc.figure.u.23"></div><pre class="inline"><span id="rfc.iref.g.39"></span><span id="rfc.iref.g.40"></span><span id="rfc.iref.g.41"></span>  <a href="#transfer.codings" class="smpl">parameter</a>               = <a href="#rule.parameter" class="smpl">attribute</a> BWS "=" BWS <a href="#rule.parameter" class="smpl">value</a>
     1037      <div id="rfc.figure.u.23"></div><pre class="inline"><span id="rfc.iref.g.39"></span><span id="rfc.iref.g.40"></span><span id="rfc.iref.g.41"></span>  <a href="#transfer.codings" class="smpl">parameter</a>               = <a href="#rule.parameter" class="smpl">attribute</a> <a href="#rule.whitespace" class="smpl">BWS</a> "=" <a href="#rule.whitespace" class="smpl">BWS</a> <a href="#rule.parameter" class="smpl">value</a>
    10381038  <a href="#rule.parameter" class="smpl">attribute</a>               = <a href="#rule.token.separators" class="smpl">token</a>
    10391039  <a href="#rule.parameter" class="smpl">value</a>                   = <a href="#rule.token.separators" class="smpl">token</a> / <a href="#rule.quoted-string" class="smpl">quoted-string</a>
     
    15681568      </p>
    15691569      <p id="rfc.section.8.1.p.2">The Connection header's value has the following grammar:</p>
    1570       <div id="rfc.figure.u.43"></div><pre class="inline"><span id="rfc.iref.g.72"></span><span id="rfc.iref.g.73"></span><span id="rfc.iref.g.74"></span>  <a href="#header.connection" class="smpl">Connection</a>       = "Connection" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.connection" class="smpl">Connection-v</a>
     1570      <div id="rfc.figure.u.43"></div><pre class="inline"><span id="rfc.iref.g.72"></span><span id="rfc.iref.g.73"></span><span id="rfc.iref.g.74"></span>  <a href="#header.connection" class="smpl">Connection</a>       = "Connection" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.connection" class="smpl">Connection-v</a>
    15711571  <a href="#header.connection" class="smpl">Connection-v</a>     = 1#<a href="#header.connection" class="smpl">connection-token</a>
    15721572  <a href="#header.connection" class="smpl">connection-token</a> = <a href="#rule.token.separators" class="smpl">token</a>
     
    15971597         or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.
    15981598      </p>
    1599       <div id="rfc.figure.u.45"></div><pre class="inline"><span id="rfc.iref.g.75"></span><span id="rfc.iref.g.76"></span>  <a href="#header.content-length" class="smpl">Content-Length</a>   = "Content-Length" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> 1*<a href="#header.content-length" class="smpl">Content-Length-v</a>
     1599      <div id="rfc.figure.u.45"></div><pre class="inline"><span id="rfc.iref.g.75"></span><span id="rfc.iref.g.76"></span>  <a href="#header.content-length" class="smpl">Content-Length</a>   = "Content-Length" ":" <a href="#rule.whitespace" class="smpl">OWS</a> 1*<a href="#header.content-length" class="smpl">Content-Length-v</a>
    16001600  <a href="#header.content-length" class="smpl">Content-Length-v</a> = 1*<a href="#core.rules" class="smpl">DIGIT</a>
    16011601</pre><p id="rfc.section.8.2.p.3">An example is</p>
     
    16151615         as orig-date in <a href="http://tools.ietf.org/html/rfc5322#section-3.6.1">Section 3.6.1</a> of <a href="#RFC5322" id="rfc.xref.RFC5322.4"><cite title="Internet Message Format">[RFC5322]</cite></a>. The field value is an HTTP-date, as described in <a href="#full.date" title="Full Date">Section&nbsp;3.3.1</a>; it <em class="bcp14">MUST</em> be sent in rfc1123-date format.
    16161616      </p>
    1617       <div id="rfc.figure.u.47"></div><pre class="inline"><span id="rfc.iref.g.77"></span><span id="rfc.iref.g.78"></span>  <a href="#header.date" class="smpl">Date</a>   = "Date" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.date" class="smpl">Date-v</a>
     1617      <div id="rfc.figure.u.47"></div><pre class="inline"><span id="rfc.iref.g.77"></span><span id="rfc.iref.g.78"></span>  <a href="#header.date" class="smpl">Date</a>   = "Date" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.date" class="smpl">Date-v</a>
    16181618  <a href="#header.date" class="smpl">Date-v</a> = <a href="#full.date" class="smpl">HTTP-date</a>
    16191619</pre><p id="rfc.section.8.3.p.3">An example is</p>
     
    16541654         a single IP address.
    16551655      </p>
    1656       <div id="rfc.figure.u.49"></div><pre class="inline"><span id="rfc.iref.g.79"></span><span id="rfc.iref.g.80"></span>  <a href="#header.host" class="smpl">Host</a>   = "Host" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.host" class="smpl">Host-v</a>
     1656      <div id="rfc.figure.u.49"></div><pre class="inline"><span id="rfc.iref.g.79"></span><span id="rfc.iref.g.80"></span>  <a href="#header.host" class="smpl">Host</a>   = "Host" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.host" class="smpl">Host-v</a>
    16571657  <a href="#header.host" class="smpl">Host-v</a> = <a href="#general.syntax" class="smpl">uri-host</a> [ ":" <a href="#general.syntax" class="smpl">port</a> ] ; <a href="#http.url" title="http URL">Section&nbsp;3.2.2</a>
    16581658</pre><p id="rfc.section.8.4.p.3">A "host" without any trailing port information implies the default port for the service requested (e.g., "80" for an HTTP
     
    16741674         and/or a comma-separated list of extension transfer-coding names with optional accept parameters (as described in <a href="#transfer.codings" title="Transfer Codings">Section&nbsp;3.4</a>).
    16751675      </p>
    1676       <div id="rfc.figure.u.51"></div><pre class="inline"><span id="rfc.iref.g.81"></span><span id="rfc.iref.g.82"></span><span id="rfc.iref.g.83"></span>  <a href="#header.te" class="smpl">TE</a>        = "TE" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.te" class="smpl">TE-v</a>
     1676      <div id="rfc.figure.u.51"></div><pre class="inline"><span id="rfc.iref.g.81"></span><span id="rfc.iref.g.82"></span><span id="rfc.iref.g.83"></span>  <a href="#header.te" class="smpl">TE</a>        = "TE" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.te" class="smpl">TE-v</a>
    16771677  <a href="#header.te" class="smpl">TE-v</a>      = #<a href="#header.te" class="smpl">t-codings</a>
    16781678  <a href="#header.te" class="smpl">t-codings</a> = "trailers" / ( <a href="#transfer.codings" class="smpl">transfer-extension</a> [ <a href="#abnf.dependencies" class="smpl">accept-params</a> ] )
     
    17181718         chunked transfer-coding.
    17191719      </p>
    1720       <div id="rfc.figure.u.53"></div><pre class="inline"><span id="rfc.iref.g.84"></span><span id="rfc.iref.g.85"></span>  <a href="#header.trailer" class="smpl">Trailer</a>   = "Trailer" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.trailer" class="smpl">Trailer-v</a>
     1720      <div id="rfc.figure.u.53"></div><pre class="inline"><span id="rfc.iref.g.84"></span><span id="rfc.iref.g.85"></span>  <a href="#header.trailer" class="smpl">Trailer</a>   = "Trailer" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.trailer" class="smpl">Trailer-v</a>
    17211721  <a href="#header.trailer" class="smpl">Trailer-v</a> = 1#<a href="#message.headers" class="smpl">field-name</a>
    17221722</pre><p id="rfc.section.8.6.p.3">An HTTP/1.1 message <em class="bcp14">SHOULD</em> include a Trailer header field in a message using chunked transfer-coding with a non-empty trailer. Doing so allows the recipient
     
    17391739         transfer-coding is a property of the message, not of the entity.
    17401740      </p>
    1741       <div id="rfc.figure.u.54"></div><pre class="inline"><span id="rfc.iref.g.86"></span><span id="rfc.iref.g.87"></span>  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>   = "Transfer-Encoding" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a>
     1741      <div id="rfc.figure.u.54"></div><pre class="inline"><span id="rfc.iref.g.86"></span><span id="rfc.iref.g.87"></span>  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>   = "Transfer-Encoding" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a>
    17421742  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a> = 1#<a href="#transfer.codings" class="smpl">transfer-coding</a>
    17431743</pre><p id="rfc.section.8.7.p.3">Transfer-codings are defined in <a href="#transfer.codings" title="Transfer Codings">Section&nbsp;3.4</a>. An example is:
     
    17531753         to use if the server finds it appropriate to switch protocols. The server <em class="bcp14">MUST</em> use the Upgrade header field within a 101 (Switching Protocols) response to indicate which protocol(s) are being switched.
    17541754      </p>
    1755       <div id="rfc.figure.u.56"></div><pre class="inline"><span id="rfc.iref.g.88"></span><span id="rfc.iref.g.89"></span>  <a href="#header.upgrade" class="smpl">Upgrade</a>   = "Upgrade" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.upgrade" class="smpl">Upgrade-v</a>
     1755      <div id="rfc.figure.u.56"></div><pre class="inline"><span id="rfc.iref.g.88"></span><span id="rfc.iref.g.89"></span>  <a href="#header.upgrade" class="smpl">Upgrade</a>   = "Upgrade" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.upgrade" class="smpl">Upgrade-v</a>
    17561756  <a href="#header.upgrade" class="smpl">Upgrade-v</a> = 1#<a href="#product.tokens" class="smpl">product</a>
    17571757</pre><p id="rfc.section.8.8.p.3">For example,</p>
     
    17851785         of all senders along the request/response chain.
    17861786      </p>
    1787       <div id="rfc.figure.u.58"></div><pre class="inline"><span id="rfc.iref.g.90"></span><span id="rfc.iref.g.91"></span><span id="rfc.iref.g.92"></span><span id="rfc.iref.g.93"></span><span id="rfc.iref.g.94"></span><span id="rfc.iref.g.95"></span><span id="rfc.iref.g.96"></span>  <a href="#header.via" class="smpl">Via</a>               = "Via" <a href="#rule.whitespace" class="smpl">BWS</a> ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.via" class="smpl">Via-v</a>
     1787      <div id="rfc.figure.u.58"></div><pre class="inline"><span id="rfc.iref.g.90"></span><span id="rfc.iref.g.91"></span><span id="rfc.iref.g.92"></span><span id="rfc.iref.g.93"></span><span id="rfc.iref.g.94"></span><span id="rfc.iref.g.95"></span><span id="rfc.iref.g.96"></span>  <a href="#header.via" class="smpl">Via</a>               = "Via" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.via" class="smpl">Via-v</a>
    17881788  <a href="#header.via" class="smpl">Via-v</a>             = 1#( <a href="#header.via" class="smpl">received-protocol</a> <a href="#rule.whitespace" class="smpl">RWS</a> <a href="#header.via" class="smpl">received-by</a> [ <a href="#rule.whitespace" class="smpl">RWS</a> <a href="#rule.comment" class="smpl">comment</a> ] )
    17891789  <a href="#header.via" class="smpl">received-protocol</a> = [ <a href="#header.via" class="smpl">protocol-name</a> "/" ] <a href="#header.via" class="smpl">protocol-version</a>
Note: See TracChangeset for help on using the changeset viewer.