Changeset 400


Ignore:
Timestamp:
Nov 15, 2008, 11:45:44 AM (11 years ago)
Author:
julian.reschke@…
Message:

rewrite definition of list rule, deprecate empty list elements (related to #36)

Location:
draft-ietf-httpbis/latest
Files:
2 edited

Legend:

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

    r398 r400  
    717717      </p>
    718718      <p id="rfc.section.1.2.1.p.2">A construct "#" is defined, similar to "*", for defining lists of elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating at
    719          least &lt;n&gt; and at most &lt;m&gt; elements, each separated by one or more commas (",") and <em class="bcp14">OPTIONAL</em> linear white space (OWS). This makes the usual form of lists very easy; a rule such as
    720       </p>
    721       <div id="rfc.figure.u.1"></div><pre class="text"> ( *<a href="#rule.whitespace" class="smpl">OWS</a> element *( *<a href="#rule.whitespace" class="smpl">OWS</a> "," *<a href="#rule.whitespace" class="smpl">OWS</a> element ))</pre><p id="rfc.section.1.2.1.p.3">can be shown as </p>
    722       <div id="rfc.figure.u.2"></div><pre class="text"> 1#element</pre><p id="rfc.section.1.2.1.p.4">Wherever this construct is used, null elements are allowed, but do not contribute to the count of elements present. That is,
    723          "(element), , (element) " is permitted, but counts as only two elements. Therefore, where at least one element is required,
    724          at least one non-null element <em class="bcp14">MUST</em> be present. Default values are 0 and infinity so that "#element" allows any number, including zero; "1#element" requires at
    725          least one; and "1#2element" allows one or two.
    726       </p>
    727       <p id="rfc.section.1.2.1.p.5"> <span class="comment">[abnf.list: At a later point of time, we may want to add an appendix containing the whole ABNF, with the list rules expanded to strict
     719         least &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single comma (",") and optional whitespace (OWS).
     720      </p>
     721      <div id="rfc.figure.u.1"></div>
     722      <p>Thus,</p><pre class="text">  1#element =&gt; element *( OWS "," OWS element )
     723</pre><div id="rfc.figure.u.2"></div>
     724      <p>and:</p><pre class="text">  #element =&gt; [ 1#element ]
     725</pre><div id="rfc.figure.u.3"></div>
     726      <p>and for n &gt;= 1 and m &gt; 1:</p><pre class="text">  &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element )
     727</pre><p id="rfc.section.1.2.1.p.6">For compatibility with legacy list rules, recipients <em class="bcp14">SHOULD</em> accept empty list elements. In other words, consumers would follow the list productions:
     728      </p>
     729      <div id="rfc.figure.u.4"></div><pre class="text">#element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
     730
     7311#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] )
     732</pre><p id="rfc.section.1.2.1.p.8"> <span class="comment">[abnf.list: At a later point of time, we may want to add an appendix containing the whole ABNF, with the list rules expanded to strict
    728733            RFC 5234 notation.]</span>
    729734      </p>
     
    748753         <p id="rfc.section.1.2.2.p.6">        </p>
    749754      </div>
    750       <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span>  <a href="#rule.whitespace" class="smpl">OWS</a>            = *( [ obs-fold ] <a href="#core.rules" class="smpl">WSP</a> )
     755      <div id="rfc.figure.u.5"></div><pre class="inline"><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span>  <a href="#rule.whitespace" class="smpl">OWS</a>            = *( [ obs-fold ] <a href="#core.rules" class="smpl">WSP</a> )
    751756                 ; "optional" white space
    752757  <a href="#rule.whitespace" class="smpl">RWS</a>            = 1*( [ obs-fold ] <a href="#core.rules" class="smpl">WSP</a> )
     
    759764         </p>
    760765      </div>
    761       <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></span>  <a href="#rule.token.separators" class="smpl">tchar</a>          = "!" / "#" / "$" / "%" / "&amp;" / "'" / "*"
     766      <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></span>  <a href="#rule.token.separators" class="smpl">tchar</a>          = "!" / "#" / "$" / "%" / "&amp;" / "'" / "*"
    762767                 / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
    763768                 / <a href="#core.rules" class="smpl">DIGIT</a> / <a href="#core.rules" class="smpl">ALPHA</a>
     
    767772         <p id="rfc.section.1.2.2.p.10">      A string of text is parsed as a single word if it is quoted using double-quote marks.</p>
    768773      </div>
    769       <div id="rfc.figure.u.5"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span>  <a href="#rule.quoted-string" class="smpl">quoted-string</a>  = <a href="#core.rules" class="smpl">DQUOTE</a> *(<a href="#rule.quoted-string" class="smpl">qdtext</a> / <a href="#rule.quoted-pair" class="smpl">quoted-pair</a> ) <a href="#core.rules" class="smpl">DQUOTE</a>
     774      <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span>  <a href="#rule.quoted-string" class="smpl">quoted-string</a>  = <a href="#core.rules" class="smpl">DQUOTE</a> *(<a href="#rule.quoted-string" class="smpl">qdtext</a> / <a href="#rule.quoted-pair" class="smpl">quoted-pair</a> ) <a href="#core.rules" class="smpl">DQUOTE</a>
    770775  <a href="#rule.quoted-string" class="smpl">qdtext</a>         = *( <a href="#rule.whitespace" class="smpl">OWS</a> / %x21 / %x23-5B / %x5D-7E / <a href="#rule.quoted-string" class="smpl">obs-text</a> )
    771776  <a href="#rule.quoted-string" class="smpl">obs-text</a>       = %x80-FF
     
    774779         </p>
    775780      </div>
    776       <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span>  <a href="#rule.quoted-pair" class="smpl">quoted-text</a>    = %x01-09 /
     781      <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span>  <a href="#rule.quoted-pair" class="smpl">quoted-text</a>    = %x01-09 /
    777782                   %x0B-0C /
    778783                   %x0E-FF ; Characters excluding NUL, <a href="#core.rules" class="smpl">CR</a> and <a href="#core.rules" class="smpl">LF</a>
     
    780785</pre><h3 id="rfc.section.1.2.3"><a href="#rfc.section.1.2.3">1.2.3</a>&nbsp;<a id="abnf.dependencies" href="#abnf.dependencies">ABNF Rules defined in other Parts of the Specification</a></h3>
    781786      <p id="rfc.section.1.2.3.p.1">The ABNF rules below are defined in other parts:</p>
    782       <div id="rfc.figure.u.7"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">request-header</a>  = &lt;request-header, defined in <a href="#Part2" id="rfc.xref.Part2.1"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#request.header.fields" title="Request Header Fields">Section 4</a>&gt;
     787      <div id="rfc.figure.u.9"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">request-header</a>  = &lt;request-header, defined in <a href="#Part2" id="rfc.xref.Part2.1"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#request.header.fields" title="Request Header Fields">Section 4</a>&gt;
    783788  <a href="#abnf.dependencies" class="smpl">response-header</a> = &lt;response-header, defined in <a href="#Part2" id="rfc.xref.Part2.2"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#response.header.fields" title="Response Header Fields">Section 6</a>&gt;
    784 </pre><div id="rfc.figure.u.8"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">accept-params</a>   = &lt;accept-params, defined in <a href="#Part3" id="rfc.xref.Part3.3"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#header.accept" title="Accept">Section 6.1</a>&gt;
     789</pre><div id="rfc.figure.u.10"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">accept-params</a>   = &lt;accept-params, defined in <a href="#Part3" id="rfc.xref.Part3.3"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#header.accept" title="Accept">Section 6.1</a>&gt;
    785790  <a href="#abnf.dependencies" class="smpl">entity-body</a>     = &lt;entity-body, defined in <a href="#Part3" id="rfc.xref.Part3.4"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#entity.body" title="Entity Body">Section 4.2</a>&gt;
    786791  <a href="#abnf.dependencies" class="smpl">entity-header</a>   = &lt;entity-header, defined in <a href="#Part3" id="rfc.xref.Part3.5"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#entity.header.fields" title="Entity Header Fields">Section 4.1</a>&gt;
    787 </pre><div id="rfc.figure.u.9"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">Cache-Control</a>   = &lt;Cache-Control, defined in <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.pragma" title="Pragma">Section 16.4</a>&gt;
     792</pre><div id="rfc.figure.u.11"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">Cache-Control</a>   = &lt;Cache-Control, defined in <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.pragma" title="Pragma">Section 16.4</a>&gt;
    788793  <a href="#abnf.dependencies" class="smpl">Pragma</a>          = &lt;Pragma, defined in <a href="#Part6" id="rfc.xref.Part6.2"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.pragma" title="Pragma">Section 16.4</a>&gt;
    789794  <a href="#abnf.dependencies" class="smpl">Warning</a>         = &lt;Warning, defined in <a href="#Part6" id="rfc.xref.Part6.3"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.warning" title="Warning">Section 16.6</a>&gt;
     
    801806         "path-abempty", "path-absolute", "query", and "authority" from <a href="#RFC3986" id="rfc.xref.RFC3986.4"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>. In addition, we define a partial-URI rule for protocol elements that allow a relative URI without a fragment.
    802807      </p>
    803       <div id="rfc.figure.u.10"></div><pre class="inline"><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span><span id="rfc.iref.g.26"></span><span id="rfc.iref.g.27"></span><span id="rfc.iref.g.28"></span><span id="rfc.iref.g.29"></span>  <a href="#uri" class="smpl">URI</a>           = &lt;URI, defined in <a href="#RFC3986" id="rfc.xref.RFC3986.5"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-3">Section 3</a>&gt;
     808      <div id="rfc.figure.u.12"></div><pre class="inline"><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span><span id="rfc.iref.g.26"></span><span id="rfc.iref.g.27"></span><span id="rfc.iref.g.28"></span><span id="rfc.iref.g.29"></span>  <a href="#uri" class="smpl">URI</a>           = &lt;URI, defined in <a href="#RFC3986" id="rfc.xref.RFC3986.5"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-3">Section 3</a>&gt;
    804809  <a href="#uri" class="smpl">URI-reference</a> = &lt;URI-reference, defined in <a href="#RFC3986" id="rfc.xref.RFC3986.6"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-4.1">Section 4.1</a>&gt;
    805810  <a href="#uri" class="smpl">absolute-URI</a>  = &lt;absolute-URI, defined in <a href="#RFC3986" id="rfc.xref.RFC3986.7"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-4.3">Section 4.3</a>&gt;
     
    825830         for identifiers using the http or https URI schemes.
    826831      </p>
    827       <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.30"></span>  <a href="#http.uri" class="smpl">http-URI</a> = "http:" "//" <a href="#uri" class="smpl">authority</a> <a href="#uri" class="smpl">path-abempty</a> [ "?" <a href="#uri" class="smpl">query</a> ]
     832      <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.30"></span>  <a href="#http.uri" class="smpl">http-URI</a> = "http:" "//" <a href="#uri" class="smpl">authority</a> <a href="#uri" class="smpl">path-abempty</a> [ "?" <a href="#uri" class="smpl">query</a> ]
    828833</pre><p id="rfc.section.2.1.1.p.3">If the port is empty or not given, port 80 is assumed. The semantics are that the identified resource is located at the server
    829834         listening for TCP connections on that port of that host, and the request-target for the resource is path-absolute (<a href="#request-target" title="request-target">Section&nbsp;5.1.2</a>). The use of IP addresses in URLs <em class="bcp14">SHOULD</em> be avoided whenever possible (see <a href="#RFC1900" id="rfc.xref.RFC1900.1"><cite title="Renumbering Needs Work">[RFC1900]</cite></a>). If the path-absolute is not present in the URL, it <em class="bcp14">MUST</em> be given as "/" when used as a request-target for a resource (<a href="#request-target" title="request-target">Section&nbsp;5.1.2</a>). If a proxy receives a host name which is not a fully qualified domain name, it <em class="bcp14">MAY</em> add its domain to the host name it received. If a proxy receives a fully qualified domain name, the proxy <em class="bcp14">MUST NOT</em> change the host name.
     
    847852      </p>
    848853      <p id="rfc.section.2.1.2.p.3">For example, the following three URIs are equivalent:</p>
    849       <div id="rfc.figure.u.12"></div><pre class="text">   http://example.com:80/~smith/home.html
     854      <div id="rfc.figure.u.14"></div><pre class="text">   http://example.com:80/~smith/home.html
    850855   http://EXAMPLE.com/%7Esmith/home.html
    851856   http://EXAMPLE.com:/%7esmith/home.html
     
    862867         server (O).
    863868      </p>
    864       <div id="rfc.figure.u.13"></div><pre class="drawing">       request chain ------------------------&gt;
     869      <div id="rfc.figure.u.15"></div><pre class="drawing">       request chain ------------------------&gt;
    865870    UA -------------------v------------------- O
    866871       &lt;----------------------- response chain
     
    873878         cannot understand the contents of the messages.
    874879      </p>
    875       <div id="rfc.figure.u.14"></div><pre class="drawing">       request chain --------------------------------------&gt;
     880      <div id="rfc.figure.u.16"></div><pre class="drawing">       request chain --------------------------------------&gt;
    876881    UA -----v----- A -----v----- B -----v----- C -----v----- O
    877882       &lt;------------------------------------- response chain
     
    888893         O (via C) for a request which has not been cached by UA or A.
    889894      </p>
    890       <div id="rfc.figure.u.15"></div><pre class="drawing">          request chain ----------&gt;
     895      <div id="rfc.figure.u.17"></div><pre class="drawing">          request chain ----------&gt;
    891896       UA -----v----- A -----v----- B - - - - - - C - - - - - - O
    892897          &lt;--------- response chain
     
    929934      </p>
    930935      <p id="rfc.section.3.1.p.2">The version of an HTTP message is indicated by an HTTP-Version field in the first line of the message. HTTP-Version is case-sensitive.</p>
    931       <div id="rfc.figure.u.16"></div><pre class="inline"><span id="rfc.iref.g.31"></span><span id="rfc.iref.g.32"></span>  <a href="#http.version" class="smpl">HTTP-Version</a>   = <a href="#http.version" class="smpl">HTTP-Prot-Name</a> "/" 1*<a href="#core.rules" class="smpl">DIGIT</a> "." 1*<a href="#core.rules" class="smpl">DIGIT</a>
     936      <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.31"></span><span id="rfc.iref.g.32"></span>  <a href="#http.version" class="smpl">HTTP-Version</a>   = <a href="#http.version" class="smpl">HTTP-Prot-Name</a> "/" 1*<a href="#core.rules" class="smpl">DIGIT</a> "." 1*<a href="#core.rules" class="smpl">DIGIT</a>
    932937  <a href="#http.version" class="smpl">HTTP-Prot-Name</a> = %x48.54.54.50 ; "HTTP", case-sensitive
    933938</pre><p id="rfc.section.3.1.p.4">Note that the major and minor numbers <em class="bcp14">MUST</em> be treated as separate integers and that each <em class="bcp14">MAY</em> be incremented higher than a single digit. Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is lower than HTTP/12.3.
     
    953958      <h3 id="rfc.section.3.2.1"><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;<a id="full.date" href="#full.date">Full Date</a></h3>
    954959      <p id="rfc.section.3.2.1.p.1">HTTP applications have historically allowed three different formats for the representation of date/time stamps:</p>
    955       <div id="rfc.figure.u.17"></div><pre class="text">   Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
     960      <div id="rfc.figure.u.19"></div><pre class="text">   Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
    956961   Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
    957962   Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
     
    968973         time zone, and <em class="bcp14">MUST</em> be assumed when reading the asctime format. HTTP-date is case sensitive and <em class="bcp14">MUST NOT</em> include additional whitespace beyond that specifically included as SP in the grammar.
    969974      </p>
    970       <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.33"></span><span id="rfc.iref.g.34"></span><span id="rfc.iref.g.35"></span><span id="rfc.iref.g.36"></span><span id="rfc.iref.g.37"></span><span id="rfc.iref.g.38"></span><span id="rfc.iref.g.39"></span><span id="rfc.iref.g.40"></span><span id="rfc.iref.g.41"></span><span id="rfc.iref.g.42"></span><span id="rfc.iref.g.43"></span><span id="rfc.iref.g.44"></span>  <a href="#full.date" class="smpl">HTTP-date</a>    = <a href="#full.date" class="smpl">rfc1123-date</a> / <a href="#full.date" class="smpl">obsolete-date</a>
     975      <div id="rfc.figure.u.20"></div><pre class="inline"><span id="rfc.iref.g.33"></span><span id="rfc.iref.g.34"></span><span id="rfc.iref.g.35"></span><span id="rfc.iref.g.36"></span><span id="rfc.iref.g.37"></span><span id="rfc.iref.g.38"></span><span id="rfc.iref.g.39"></span><span id="rfc.iref.g.40"></span><span id="rfc.iref.g.41"></span><span id="rfc.iref.g.42"></span><span id="rfc.iref.g.43"></span><span id="rfc.iref.g.44"></span>  <a href="#full.date" class="smpl">HTTP-date</a>    = <a href="#full.date" class="smpl">rfc1123-date</a> / <a href="#full.date" class="smpl">obsolete-date</a>
    971976  <a href="#full.date" class="smpl">obsolete-date</a> = <a href="#full.date" class="smpl">rfc850-date</a> / <a href="#full.date" class="smpl">asctime-date</a>
    972977  <a href="#full.date" class="smpl">rfc1123-date</a> = <a href="#full.date" class="smpl">wkday</a> "," <a href="#core.rules" class="smpl">SP</a> date1 <a href="#core.rules" class="smpl">SP</a> time <a href="#core.rules" class="smpl">SP</a> GMT
     
    10271032         is a property of the message, not of the original entity.
    10281033      </p>
    1029       <div id="rfc.figure.u.19"></div><pre class="inline"><span id="rfc.iref.g.45"></span><span id="rfc.iref.g.46"></span>  <a href="#transfer.codings" class="smpl">transfer-coding</a>         = "chunked" / <a href="#transfer.codings" class="smpl">transfer-extension</a>
     1034      <div id="rfc.figure.u.21"></div><pre class="inline"><span id="rfc.iref.g.45"></span><span id="rfc.iref.g.46"></span>  <a href="#transfer.codings" class="smpl">transfer-coding</a>         = "chunked" / <a href="#transfer.codings" class="smpl">transfer-extension</a>
    10301035  <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> )
    10311036</pre><div id="rule.parameter">
    10321037         <p id="rfc.section.3.3.p.3">      Parameters are in the form of attribute/value pairs.</p>
    10331038      </div>
    1034       <div id="rfc.figure.u.20"></div><pre class="inline"><span id="rfc.iref.g.47"></span><span id="rfc.iref.g.48"></span><span id="rfc.iref.g.49"></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>
     1039      <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.47"></span><span id="rfc.iref.g.48"></span><span id="rfc.iref.g.49"></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>
    10351040  <a href="#rule.parameter" class="smpl">attribute</a>               = <a href="#rule.token.separators" class="smpl">token</a>
    10361041  <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>
     
    10571062         necessary for the recipient to verify that it has received the full message.
    10581063      </p>
    1059       <div id="rfc.figure.u.21"></div><pre class="inline"><span id="rfc.iref.g.50"></span><span id="rfc.iref.g.51"></span><span id="rfc.iref.g.52"></span><span id="rfc.iref.g.53"></span><span id="rfc.iref.g.54"></span><span id="rfc.iref.g.55"></span><span id="rfc.iref.g.56"></span><span id="rfc.iref.g.57"></span><span id="rfc.iref.g.58"></span>  <a href="#chunked.transfer.encoding" class="smpl">Chunked-Body</a>   = *<a href="#chunked.transfer.encoding" class="smpl">chunk</a>
     1064      <div id="rfc.figure.u.23"></div><pre class="inline"><span id="rfc.iref.g.50"></span><span id="rfc.iref.g.51"></span><span id="rfc.iref.g.52"></span><span id="rfc.iref.g.53"></span><span id="rfc.iref.g.54"></span><span id="rfc.iref.g.55"></span><span id="rfc.iref.g.56"></span><span id="rfc.iref.g.57"></span><span id="rfc.iref.g.58"></span>  <a href="#chunked.transfer.encoding" class="smpl">Chunked-Body</a>   = *<a href="#chunked.transfer.encoding" class="smpl">chunk</a>
    10601065                   <a href="#chunked.transfer.encoding" class="smpl">last-chunk</a>
    10611066                   <a href="#chunked.transfer.encoding" class="smpl">trailer-part</a>
     
    10951100      </p>
    10961101      <p id="rfc.section.3.3.1.p.7">A process for decoding the "chunked" transfer-coding can be represented in pseudo-code as:</p>
    1097       <div id="rfc.figure.u.22"></div><pre class="text">  length := 0
     1102      <div id="rfc.figure.u.24"></div><pre class="text">  length := 0
    10981103  read chunk-size, chunk-ext (if any) and CRLF
    10991104  while (chunk-size &gt; 0) {
     
    11171122         space. By convention, the products are listed in order of their significance for identifying the application.
    11181123      </p>
    1119       <div id="rfc.figure.u.23"></div><pre class="inline"><span id="rfc.iref.g.59"></span><span id="rfc.iref.g.60"></span>  <a href="#product.tokens" class="smpl">product</a>         = <a href="#rule.token.separators" class="smpl">token</a> ["/" <a href="#product.tokens" class="smpl">product-version</a>]
     1124      <div id="rfc.figure.u.25"></div><pre class="inline"><span id="rfc.iref.g.59"></span><span id="rfc.iref.g.60"></span>  <a href="#product.tokens" class="smpl">product</a>         = <a href="#rule.token.separators" class="smpl">token</a> ["/" <a href="#product.tokens" class="smpl">product-version</a>]
    11201125  <a href="#product.tokens" class="smpl">product-version</a> = <a href="#rule.token.separators" class="smpl">token</a>
    11211126</pre><p id="rfc.section.3.4.p.3">Examples:</p>
    1122       <div id="rfc.figure.u.24"></div><pre class="text">    User-Agent: CERN-LineMode/2.15 libwww/2.17b3
     1127      <div id="rfc.figure.u.26"></div><pre class="text">    User-Agent: CERN-LineMode/2.15 libwww/2.17b3
    11231128    Server: Apache/0.8.4
    11241129</pre><p id="rfc.section.3.4.p.5">Product tokens <em class="bcp14">SHOULD</em> be short and to the point. They <em class="bcp14">MUST NOT</em> be used for advertising or other non-essential information. Although any token character <em class="bcp14">MAY</em> appear in a product-version, this token <em class="bcp14">SHOULD</em> only be used for a version identifier (i.e., successive versions of the same product <em class="bcp14">SHOULD</em> only differ in the product-version portion of the product value).
     
    11271132      <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;<a id="message.types" href="#message.types">Message Types</a></h2>
    11281133      <p id="rfc.section.4.1.p.1">HTTP messages consist of requests from client to server and responses from server to client.</p>
    1129       <div id="rfc.figure.u.25"></div><pre class="inline"><span id="rfc.iref.g.61"></span>  <a href="#message.types" class="smpl">HTTP-message</a>   = <a href="#request" class="smpl">Request</a> / <a href="#response" class="smpl">Response</a>     ; HTTP/1.1 messages
     1134      <div id="rfc.figure.u.27"></div><pre class="inline"><span id="rfc.iref.g.61"></span>  <a href="#message.types" class="smpl">HTTP-message</a>   = <a href="#request" class="smpl">Request</a> / <a href="#response" class="smpl">Response</a>     ; HTTP/1.1 messages
    11301135</pre><p id="rfc.section.4.1.p.3">Request (<a href="#request" title="Request">Section&nbsp;5</a>) and Response (<a href="#response" title="Response">Section&nbsp;6</a>) messages use the generic message format of <a href="#RFC5322" id="rfc.xref.RFC5322.2"><cite title="Internet Message Format">[RFC5322]</cite></a> for transferring entities (the payload of the message). Both types of message consist of a start-line, zero or more header
    11311136         fields (also known as "headers"), an empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the header
    11321137         fields, and possibly a message-body.
    11331138      </p>
    1134       <div id="rfc.figure.u.26"></div><pre class="inline"><span id="rfc.iref.g.62"></span><span id="rfc.iref.g.63"></span>  <a href="#message.types" class="smpl">generic-message</a> = <a href="#message.types" class="smpl">start-line</a>
     1139      <div id="rfc.figure.u.28"></div><pre class="inline"><span id="rfc.iref.g.62"></span><span id="rfc.iref.g.63"></span>  <a href="#message.types" class="smpl">generic-message</a> = <a href="#message.types" class="smpl">start-line</a>
    11351140                    *(<a href="#message.headers" class="smpl">message-header</a> <a href="#core.rules" class="smpl">CRLF</a>)
    11361141                    <a href="#core.rules" class="smpl">CRLF</a>
     
    11511156         case-insensitive.
    11521157      </p>
    1153       <div id="rfc.figure.u.27"></div><pre class="inline"><span id="rfc.iref.g.64"></span><span id="rfc.iref.g.65"></span><span id="rfc.iref.g.66"></span><span id="rfc.iref.g.67"></span>  <a href="#message.headers" class="smpl">message-header</a> = <a href="#message.headers" class="smpl">field-name</a> ":" OWS [ <a href="#message.headers" class="smpl">field-value</a> ] OWS
     1158      <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.64"></span><span id="rfc.iref.g.65"></span><span id="rfc.iref.g.66"></span><span id="rfc.iref.g.67"></span>  <a href="#message.headers" class="smpl">message-header</a> = <a href="#message.headers" class="smpl">field-name</a> ":" OWS [ <a href="#message.headers" class="smpl">field-value</a> ] OWS
    11541159  <a href="#message.headers" class="smpl">field-name</a>     = <a href="#rule.token.separators" class="smpl">token</a>
    11551160  <a href="#message.headers" class="smpl">field-value</a>    = *( <a href="#message.headers" class="smpl">field-content</a> / <a href="#rule.whitespace" class="smpl">OWS</a> )
     
    11761181         </p>
    11771182      </div>
    1178       <div id="rfc.figure.u.28"></div><pre class="inline"><span id="rfc.iref.g.68"></span><span id="rfc.iref.g.69"></span>  <a href="#rule.comment" class="smpl">comment</a>        = "(" *( <a href="#rule.comment" class="smpl">ctext</a> / <a href="#rule.quoted-pair" class="smpl">quoted-pair</a> / <a href="#rule.comment" class="smpl">comment</a> ) ")"
     1183      <div id="rfc.figure.u.30"></div><pre class="inline"><span id="rfc.iref.g.68"></span><span id="rfc.iref.g.69"></span>  <a href="#rule.comment" class="smpl">comment</a>        = "(" *( <a href="#rule.comment" class="smpl">ctext</a> / <a href="#rule.quoted-pair" class="smpl">quoted-pair</a> / <a href="#rule.comment" class="smpl">comment</a> ) ")"
    11791184  <a href="#rule.comment" class="smpl">ctext</a>          = *( <a href="#rule.whitespace" class="smpl">OWS</a> / %x21-27 / %x2A-7E / <a href="#rule.quoted-string" class="smpl">obs-text</a> )
    11801185</pre><p id="rfc.section.4.2.p.9">The order in which header fields with differing field names are received is not significant. However, it is "good practice"
     
    11991204         header field (<a href="#header.transfer-encoding" id="rfc.xref.header.transfer-encoding.2" title="Transfer-Encoding">Section&nbsp;8.7</a>).
    12001205      </p>
    1201       <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.70"></span>  <a href="#message.body" class="smpl">message-body</a> = <a href="#abnf.dependencies" class="smpl">entity-body</a>
     1206      <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.70"></span>  <a href="#message.body" class="smpl">message-body</a> = <a href="#abnf.dependencies" class="smpl">entity-body</a>
    12021207               / &lt;entity-body encoded as per <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>&gt;
    12031208</pre><p id="rfc.section.4.3.p.3">Transfer-Encoding <em class="bcp14">MUST</em> be used to indicate any transfer-codings applied by an application to ensure safe and proper transfer of the message. Transfer-Encoding
     
    12671272         to the entity being transferred. These header fields apply only to the message being transmitted.
    12681273      </p>
    1269       <div id="rfc.figure.u.30"></div><pre class="inline"><span id="rfc.iref.g.71"></span>  <a href="#general.header.fields" class="smpl">general-header</a> = <a href="#abnf.dependencies" class="smpl">Cache-Control</a>            ; <a href="#Part6" id="rfc.xref.Part6.5"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.cache-control" title="Cache-Control">Section 16.2</a>
     1274      <div id="rfc.figure.u.32"></div><pre class="inline"><span id="rfc.iref.g.71"></span>  <a href="#general.header.fields" class="smpl">general-header</a> = <a href="#abnf.dependencies" class="smpl">Cache-Control</a>            ; <a href="#Part6" id="rfc.xref.Part6.5"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.cache-control" title="Cache-Control">Section 16.2</a>
    12701275                 / <a href="#header.connection" class="smpl">Connection</a>               ; <a href="#header.connection" id="rfc.xref.header.connection.1" title="Connection">Section&nbsp;8.1</a>
    12711276                 / <a href="#header.date" class="smpl">Date</a>                     ; <a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section&nbsp;8.3</a>
     
    12841289         resource, the identifier of the resource, and the protocol version in use.
    12851290      </p>
    1286       <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.72"></span>  <a href="#request" class="smpl">Request</a>       = <a href="#request-line" class="smpl">Request-Line</a>              ; <a href="#request-line" title="Request-Line">Section&nbsp;5.1</a>
     1291      <div id="rfc.figure.u.33"></div><pre class="inline"><span id="rfc.iref.g.72"></span>  <a href="#request" class="smpl">Request</a>       = <a href="#request-line" class="smpl">Request-Line</a>              ; <a href="#request-line" title="Request-Line">Section&nbsp;5.1</a>
    12871292                  *(( <a href="#general.header.fields" class="smpl">general-header</a>        ; <a href="#general.header.fields" title="General Header Fields">Section&nbsp;4.5</a>
    12881293                   / <a href="#abnf.dependencies" class="smpl">request-header</a>         ; <a href="#Part2" id="rfc.xref.Part2.4"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#request.header.fields" title="Request Header Fields">Section 4</a>
     
    12941299         The elements are separated by SP characters. No CR or LF is allowed except in the final CRLF sequence.
    12951300      </p>
    1296       <div id="rfc.figure.u.32"></div><pre class="inline"><span id="rfc.iref.g.73"></span>  <a href="#request-line" class="smpl">Request-Line</a>   = <a href="#method" class="smpl">Method</a> <a href="#core.rules" class="smpl">SP</a> <a href="#request-target" class="smpl">request-target</a> <a href="#core.rules" class="smpl">SP</a> <a href="#http.version" class="smpl">HTTP-Version</a> <a href="#core.rules" class="smpl">CRLF</a>
     1301      <div id="rfc.figure.u.34"></div><pre class="inline"><span id="rfc.iref.g.73"></span>  <a href="#request-line" class="smpl">Request-Line</a>   = <a href="#method" class="smpl">Method</a> <a href="#core.rules" class="smpl">SP</a> <a href="#request-target" class="smpl">request-target</a> <a href="#core.rules" class="smpl">SP</a> <a href="#http.version" class="smpl">HTTP-Version</a> <a href="#core.rules" class="smpl">CRLF</a>
    12971302</pre><h3 id="rfc.section.5.1.1"><a href="#rfc.section.5.1.1">5.1.1</a>&nbsp;<a id="method" href="#method">Method</a></h3>
    12981303      <p id="rfc.section.5.1.1.p.1">The Method token indicates the method to be performed on the resource identified by the request-target. The method is case-sensitive.</p>
    1299       <div id="rfc.figure.u.33"></div><pre class="inline"><span id="rfc.iref.g.74"></span><span id="rfc.iref.g.75"></span>  <a href="#method" class="smpl">Method</a>         = <a href="#rule.token.separators" class="smpl">token</a>
     1304      <div id="rfc.figure.u.35"></div><pre class="inline"><span id="rfc.iref.g.74"></span><span id="rfc.iref.g.75"></span>  <a href="#method" class="smpl">Method</a>         = <a href="#rule.token.separators" class="smpl">token</a>
    13001305</pre><h3 id="rfc.section.5.1.2"><a href="#rfc.section.5.1.2">5.1.2</a>&nbsp;<a id="request-target" href="#request-target">request-target</a></h3>
    13011306      <p id="rfc.section.5.1.2.p.1">The request-target is a Uniform Resource Identifier (<a href="#uri" title="Uniform Resource Identifiers">Section&nbsp;2.1</a>) and identifies the resource upon which to apply the request.
    13021307      </p>
    1303       <div id="rfc.figure.u.34"></div><pre class="inline"><span id="rfc.iref.g.76"></span>  <a href="#request-target" class="smpl">request-target</a>    = "*"
     1308      <div id="rfc.figure.u.36"></div><pre class="inline"><span id="rfc.iref.g.76"></span>  <a href="#request-target" class="smpl">request-target</a>    = "*"
    13041309                 / <a href="#uri" class="smpl">absolute-URI</a>
    13051310                 / ( <a href="#uri" class="smpl">path-absolute</a> [ "?" <a href="#uri" class="smpl">query</a> ] )
     
    13091314         apply to a resource. One example would be
    13101315      </p>
    1311       <div id="rfc.figure.u.35"></div><pre class="text">    OPTIONS * HTTP/1.1
     1316      <div id="rfc.figure.u.37"></div><pre class="text">    OPTIONS * HTTP/1.1
    13121317</pre><p id="rfc.section.5.1.2.p.5">The absolute-URI form is <em class="bcp14">REQUIRED</em> when the request is being made to a proxy. The proxy is requested to forward the request or service it from a valid cache,
    13131318         and return the response. Note that the proxy <em class="bcp14">MAY</em> forward the request on to another proxy or directly to the server specified by the absolute-URI. In order to avoid request
     
    13151320         Request-Line would be:
    13161321      </p>
    1317       <div id="rfc.figure.u.36"></div><pre class="text">    GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1
     1322      <div id="rfc.figure.u.38"></div><pre class="text">    GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1
    13181323</pre><p id="rfc.section.5.1.2.p.7">To allow for transition to absolute-URIs in all requests in future versions of HTTP, all HTTP/1.1 servers <em class="bcp14">MUST</em> accept the absolute-URI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies.
    13191324      </p>
     
    13241329         server would create a TCP connection to port 80 of the host "www.example.org" and send the lines:
    13251330      </p>
    1326       <div id="rfc.figure.u.37"></div><pre class="text">    GET /pub/WWW/TheProject.html HTTP/1.1
     1331      <div id="rfc.figure.u.39"></div><pre class="text">    GET /pub/WWW/TheProject.html HTTP/1.1
    13271332    Host: www.example.org
    13281333</pre><p id="rfc.section.5.1.2.p.11">followed by the remainder of the Request. Note that the absolute path cannot be empty; if none is present in the original
     
    13691374      <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="response" href="#response">Response</a></h1>
    13701375      <p id="rfc.section.6.p.1">After receiving and interpreting a request message, a server responds with an HTTP response message.</p>
    1371       <div id="rfc.figure.u.38"></div><pre class="inline"><span id="rfc.iref.g.77"></span>  <a href="#response" class="smpl">Response</a>      = <a href="#status-line" class="smpl">Status-Line</a>               ; <a href="#status-line" title="Status-Line">Section&nbsp;6.1</a>
     1376      <div id="rfc.figure.u.40"></div><pre class="inline"><span id="rfc.iref.g.77"></span>  <a href="#response" class="smpl">Response</a>      = <a href="#status-line" class="smpl">Status-Line</a>               ; <a href="#status-line" title="Status-Line">Section&nbsp;6.1</a>
    13721377                  *(( <a href="#general.header.fields" class="smpl">general-header</a>        ; <a href="#general.header.fields" title="General Header Fields">Section&nbsp;4.5</a>
    13731378                   / <a href="#abnf.dependencies" class="smpl">response-header</a>        ; <a href="#Part2" id="rfc.xref.Part2.7"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#response.header.fields" title="Response Header Fields">Section 6</a>
     
    13801385         CRLF sequence.
    13811386      </p>
    1382       <div id="rfc.figure.u.39"></div><pre class="inline"><span id="rfc.iref.g.78"></span>  <a href="#status-line" class="smpl">Status-Line</a> = <a href="#http.version" class="smpl">HTTP-Version</a> <a href="#core.rules" class="smpl">SP</a> <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a> <a href="#core.rules" class="smpl">SP</a> <a href="#status.code.and.reason.phrase" class="smpl">Reason-Phrase</a> <a href="#core.rules" class="smpl">CRLF</a>
     1387      <div id="rfc.figure.u.41"></div><pre class="inline"><span id="rfc.iref.g.78"></span>  <a href="#status-line" class="smpl">Status-Line</a> = <a href="#http.version" class="smpl">HTTP-Version</a> <a href="#core.rules" class="smpl">SP</a> <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a> <a href="#core.rules" class="smpl">SP</a> <a href="#status.code.and.reason.phrase" class="smpl">Reason-Phrase</a> <a href="#core.rules" class="smpl">CRLF</a>
    13831388</pre><h3 id="rfc.section.6.1.1"><a href="#rfc.section.6.1.1">6.1.1</a>&nbsp;<a id="status.code.and.reason.phrase" href="#status.code.and.reason.phrase">Status Code and Reason Phrase</a></h3>
    13841389      <p id="rfc.section.6.1.1.p.1">The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request. These codes
     
    13971402         <li>5xx: Server Error - The server failed to fulfill an apparently valid request</li>
    13981403      </ul>
    1399       <div id="rfc.figure.u.40"></div><pre class="inline"><span id="rfc.iref.g.79"></span><span id="rfc.iref.g.80"></span><span id="rfc.iref.g.81"></span>  <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a>    = 3<a href="#core.rules" class="smpl">DIGIT</a>
     1404      <div id="rfc.figure.u.42"></div><pre class="inline"><span id="rfc.iref.g.79"></span><span id="rfc.iref.g.80"></span><span id="rfc.iref.g.81"></span>  <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a>    = 3<a href="#core.rules" class="smpl">DIGIT</a>
    14001405  <a href="#status.code.and.reason.phrase" class="smpl">Reason-Phrase</a>  = *( <a href="#core.rules" class="smpl">WSP</a> / <a href="#core.rules" class="smpl">VCHAR</a> / <a href="#rule.quoted-string" class="smpl">obs-text</a> )
    14011406</pre><h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a id="connections" href="#connections">Connections</a></h1>
     
    15891594      </p>
    15901595      <p id="rfc.section.8.1.p.2">The Connection header's value has the following grammar:</p>
    1591       <div id="rfc.figure.u.41"></div><pre class="inline"><span id="rfc.iref.g.82"></span><span id="rfc.iref.g.83"></span><span id="rfc.iref.g.84"></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>
     1596      <div id="rfc.figure.u.43"></div><pre class="inline"><span id="rfc.iref.g.82"></span><span id="rfc.iref.g.83"></span><span id="rfc.iref.g.84"></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>
    15921597  <a href="#header.connection" class="smpl">Connection-v</a>     = 1#<a href="#header.connection" class="smpl">connection-token</a>
    15931598  <a href="#header.connection" class="smpl">connection-token</a> = <a href="#rule.token.separators" class="smpl">token</a>
     
    16021607         of the response. For example,
    16031608      </p>
    1604       <div id="rfc.figure.u.42"></div><pre class="text">  Connection: close
     1609      <div id="rfc.figure.u.44"></div><pre class="text">  Connection: close
    16051610</pre><p id="rfc.section.8.1.p.8">in either the request or the response header fields indicates that the connection <em class="bcp14">SHOULD NOT</em> be considered `persistent' (<a href="#persistent.connections" title="Persistent Connections">Section&nbsp;7.1</a>) after the current request/response is complete.
    16061611      </p>
     
    16181623         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.
    16191624      </p>
    1620       <div id="rfc.figure.u.43"></div><pre class="inline"><span id="rfc.iref.g.85"></span><span id="rfc.iref.g.86"></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>
     1625      <div id="rfc.figure.u.45"></div><pre class="inline"><span id="rfc.iref.g.85"></span><span id="rfc.iref.g.86"></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>
    16211626  <a href="#header.content-length" class="smpl">Content-Length-v</a> = 1*<a href="#core.rules" class="smpl">DIGIT</a>
    16221627</pre><p id="rfc.section.8.2.p.3">An example is</p>
    1623       <div id="rfc.figure.u.44"></div><pre class="text">  Content-Length: 3495
     1628      <div id="rfc.figure.u.46"></div><pre class="text">  Content-Length: 3495
    16241629</pre><p id="rfc.section.8.2.p.5">Applications <em class="bcp14">SHOULD</em> use this field to indicate the transfer-length of the message-body, unless this is prohibited by the rules in <a href="#message.length" title="Message Length">Section&nbsp;4.4</a>.
    16251630      </p>
     
    16361641         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.2.1</a>; it <em class="bcp14">MUST</em> be sent in rfc1123-date format.
    16371642      </p>
    1638       <div id="rfc.figure.u.45"></div><pre class="inline"><span id="rfc.iref.g.87"></span><span id="rfc.iref.g.88"></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>
     1643      <div id="rfc.figure.u.47"></div><pre class="inline"><span id="rfc.iref.g.87"></span><span id="rfc.iref.g.88"></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>
    16391644  <a href="#header.date" class="smpl">Date-v</a> = <a href="#full.date" class="smpl">HTTP-date</a>
    16401645</pre><p id="rfc.section.8.3.p.3">An example is</p>
    1641       <div id="rfc.figure.u.46"></div><pre class="text">  Date: Tue, 15 Nov 1994 08:12:31 GMT
     1646      <div id="rfc.figure.u.48"></div><pre class="text">  Date: Tue, 15 Nov 1994 08:12:31 GMT
    16421647</pre><p id="rfc.section.8.3.p.5">Origin servers <em class="bcp14">MUST</em> include a Date header field in all responses, except in these cases:
    16431648      </p>
     
    16751680         a single IP address.
    16761681      </p>
    1677       <div id="rfc.figure.u.47"></div><pre class="inline"><span id="rfc.iref.g.89"></span><span id="rfc.iref.g.90"></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>
     1682      <div id="rfc.figure.u.49"></div><pre class="inline"><span id="rfc.iref.g.89"></span><span id="rfc.iref.g.90"></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>
    16781683  <a href="#header.host" class="smpl">Host-v</a> = <a href="#uri" class="smpl">uri-host</a> [ ":" <a href="#uri" class="smpl">port</a> ] ; <a href="#http.uri" title="http URI scheme">Section&nbsp;2.1.1</a>
    16791684</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
    16801685         URL). For example, a request on the origin server for &lt;http://www.example.org/pub/WWW/&gt; would properly include:
    16811686      </p>
    1682       <div id="rfc.figure.u.48"></div><pre class="text">  GET /pub/WWW/ HTTP/1.1
     1687      <div id="rfc.figure.u.50"></div><pre class="text">  GET /pub/WWW/ HTTP/1.1
    16831688  Host: www.example.org
    16841689</pre><p id="rfc.section.8.4.p.5">A client <em class="bcp14">MUST</em> include a Host header field in all HTTP/1.1 request messages. If the requested URI does not include an Internet host name
     
    16951700         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.3</a>).
    16961701      </p>
    1697       <div id="rfc.figure.u.49"></div><pre class="inline"><span id="rfc.iref.g.91"></span><span id="rfc.iref.g.92"></span><span id="rfc.iref.g.93"></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>
     1702      <div id="rfc.figure.u.51"></div><pre class="inline"><span id="rfc.iref.g.91"></span><span id="rfc.iref.g.92"></span><span id="rfc.iref.g.93"></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>
    16981703  <a href="#header.te" class="smpl">TE-v</a>      = #<a href="#header.te" class="smpl">t-codings</a>
    16991704  <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> ] )
     
    17021707      </p>
    17031708      <p id="rfc.section.8.5.p.4">Examples of its use are:</p>
    1704       <div id="rfc.figure.u.50"></div><pre class="text">  TE: deflate
     1709      <div id="rfc.figure.u.52"></div><pre class="text">  TE: deflate
    17051710  TE:
    17061711  TE: trailers, deflate;q=0.5
     
    17391744         chunked transfer-coding.
    17401745      </p>
    1741       <div id="rfc.figure.u.51"></div><pre class="inline"><span id="rfc.iref.g.94"></span><span id="rfc.iref.g.95"></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>
     1746      <div id="rfc.figure.u.53"></div><pre class="inline"><span id="rfc.iref.g.94"></span><span id="rfc.iref.g.95"></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>
    17421747  <a href="#header.trailer" class="smpl">Trailer-v</a> = 1#<a href="#message.headers" class="smpl">field-name</a>
    17431748</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
     
    17601765         transfer-coding is a property of the message, not of the entity.
    17611766      </p>
    1762       <div id="rfc.figure.u.52"></div><pre class="inline"><span id="rfc.iref.g.96"></span><span id="rfc.iref.g.97"></span>  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>   = "Transfer-Encoding" ":" <a href="#rule.whitespace" class="smpl">OWS</a>
     1767      <div id="rfc.figure.u.54"></div><pre class="inline"><span id="rfc.iref.g.96"></span><span id="rfc.iref.g.97"></span>  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>   = "Transfer-Encoding" ":" <a href="#rule.whitespace" class="smpl">OWS</a>
    17631768                        <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a>
    17641769  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a> = 1#<a href="#transfer.codings" class="smpl">transfer-coding</a>
    17651770</pre><p id="rfc.section.8.7.p.3">Transfer-codings are defined in <a href="#transfer.codings" title="Transfer Codings">Section&nbsp;3.3</a>. An example is:
    17661771      </p>
    1767       <div id="rfc.figure.u.53"></div><pre class="text">  Transfer-Encoding: chunked
     1772      <div id="rfc.figure.u.55"></div><pre class="text">  Transfer-Encoding: chunked
    17681773</pre><p id="rfc.section.8.7.p.5">If multiple encodings have been applied to an entity, the transfer-codings <em class="bcp14">MUST</em> be listed in the order in which they were applied. Additional information about the encoding parameters <em class="bcp14">MAY</em> be provided by other entity-header fields not defined by this specification.
    17691774      </p>
     
    17751780         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.
    17761781      </p>
    1777       <div id="rfc.figure.u.54"></div><pre class="inline"><span id="rfc.iref.g.98"></span><span id="rfc.iref.g.99"></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>
     1782      <div id="rfc.figure.u.56"></div><pre class="inline"><span id="rfc.iref.g.98"></span><span id="rfc.iref.g.99"></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>
    17781783  <a href="#header.upgrade" class="smpl">Upgrade-v</a> = 1#<a href="#product.tokens" class="smpl">product</a>
    17791784</pre><p id="rfc.section.8.8.p.3">For example,</p>
    1780       <div id="rfc.figure.u.55"></div><pre class="text">  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
     1785      <div id="rfc.figure.u.57"></div><pre class="text">  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
    17811786</pre><p id="rfc.section.8.8.p.5">The Upgrade header field is intended to provide a simple mechanism for transition from HTTP/1.1 to some other, incompatible
    17821787         protocol. It does so by allowing the client to advertise its desire to use another protocol, such as a later version of HTTP
     
    18071812         of all senders along the request/response chain.
    18081813      </p>
    1809       <div id="rfc.figure.u.56"></div><pre class="inline"><span id="rfc.iref.g.100"></span><span id="rfc.iref.g.101"></span><span id="rfc.iref.g.102"></span><span id="rfc.iref.g.103"></span><span id="rfc.iref.g.104"></span><span id="rfc.iref.g.105"></span><span id="rfc.iref.g.106"></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>
     1814      <div id="rfc.figure.u.58"></div><pre class="inline"><span id="rfc.iref.g.100"></span><span id="rfc.iref.g.101"></span><span id="rfc.iref.g.102"></span><span id="rfc.iref.g.103"></span><span id="rfc.iref.g.104"></span><span id="rfc.iref.g.105"></span><span id="rfc.iref.g.106"></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>
    18101815  <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>
    18111816                          [ <a href="#rule.whitespace" class="smpl">RWS</a> <a href="#rule.comment" class="smpl">comment</a> ] )
     
    18321837         server at www.example.com. The request received by www.example.com would then have the following Via header field:
    18331838      </p>
    1834       <div id="rfc.figure.u.57"></div><pre class="text">  Via: 1.0 fred, 1.1 p.example.net (Apache/1.1)
     1839      <div id="rfc.figure.u.59"></div><pre class="text">  Via: 1.0 fred, 1.1 p.example.net (Apache/1.1)
    18351840</pre><p id="rfc.section.8.9.p.9">Proxies and gateways used as a portal through a network firewall <em class="bcp14">SHOULD NOT</em>, by default, forward the names and ports of hosts within the firewall region. This information <em class="bcp14">SHOULD</em> only be propagated if explicitly enabled. If not enabled, the received-by host of any host behind the firewall <em class="bcp14">SHOULD</em> be replaced by an appropriate pseudonym for that host.
    18361841      </p>
     
    18381843         For example,
    18391844      </p>
    1840       <div id="rfc.figure.u.58"></div><pre class="text">  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
     1845      <div id="rfc.figure.u.60"></div><pre class="text">  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
    18411846</pre><p id="rfc.section.8.9.p.12">could be collapsed to</p>
    1842       <div id="rfc.figure.u.59"></div><pre class="text">  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
     1847      <div id="rfc.figure.u.61"></div><pre class="text">  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
    18431848</pre><p id="rfc.section.8.9.p.14">Applications <em class="bcp14">SHOULD NOT</em> combine multiple entries unless they are all under the same organizational control and the hosts have already been replaced
    18441849         by pseudonyms. Applications <em class="bcp14">MUST NOT</em> combine entries which have different received-protocol values.
     
    24522457      </p>
    24532458      <h2 id="rfc.section.B.4"><a href="#rfc.section.B.4">B.4</a>&nbsp;<a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h2>
    2454       <p id="rfc.section.B.4.p.1">Rules about implicit linear white space between certain grammar productions have been removed; now it's only allowed when
     2459      <p id="rfc.section.B.4.p.1">Empty list elements in list productions have been deprecated. (<a href="#notation.abnf" title="ABNF Extension: #rule">Section&nbsp;1.2.1</a>)
     2460      </p>
     2461      <p id="rfc.section.B.4.p.2">Rules about implicit linear white space between certain grammar productions have been removed; now it's only allowed when
    24552462         specifically pointed out in the ABNF. The NUL character is no longer allowed in comment and quoted-string text. The quoted-pair
    24562463         rule no longer allows escaping NUL, CR or LF. Non-ASCII content in header fields and reason phrase has been obsoleted and
    24572464         made opaque (the TEXT rule was removed) (<a href="#basic.rules" title="Basic Rules">Section&nbsp;1.2.2</a>)
    24582465      </p>
    2459       <p id="rfc.section.B.4.p.2">Clarify that HTTP-Version is case sensitive. (<a href="#http.version" title="HTTP Version">Section&nbsp;3.1</a>)
    2460       </p>
    2461       <p id="rfc.section.B.4.p.3">Remove reference to non-existant identity transfer-coding value tokens. (Sections <a href="#transfer.codings" title="Transfer Codings">3.3</a> and <a href="#message.length" title="Message Length">4.4</a>)
    2462       </p>
    2463       <p id="rfc.section.B.4.p.4">Clarification that the chunk length does not include the count of the octets in the chunk header and trailer. (<a href="#chunked.transfer.encoding" title="Chunked Transfer Coding">Section&nbsp;3.3.1</a>)
    2464       </p>
    2465       <p id="rfc.section.B.4.p.5">Require that invalid whitespace around field-names be rejected. (<a href="#message.headers" title="Message Headers">Section&nbsp;4.2</a>)
    2466       </p>
    2467       <p id="rfc.section.B.4.p.6">Update use of abs_path production from RFC1808 to the path-absolute + query components of RFC3986. (<a href="#request-target" title="request-target">Section&nbsp;5.1.2</a>)
    2468       </p>
    2469       <p id="rfc.section.B.4.p.7">Clarify exactly when close connection options must be sent. (<a href="#header.connection" id="rfc.xref.header.connection.8" title="Connection">Section&nbsp;8.1</a>)
     2466      <p id="rfc.section.B.4.p.3">Clarify that HTTP-Version is case sensitive. (<a href="#http.version" title="HTTP Version">Section&nbsp;3.1</a>)
     2467      </p>
     2468      <p id="rfc.section.B.4.p.4">Remove reference to non-existant identity transfer-coding value tokens. (Sections <a href="#transfer.codings" title="Transfer Codings">3.3</a> and <a href="#message.length" title="Message Length">4.4</a>)
     2469      </p>
     2470      <p id="rfc.section.B.4.p.5">Clarification that the chunk length does not include the count of the octets in the chunk header and trailer. (<a href="#chunked.transfer.encoding" title="Chunked Transfer Coding">Section&nbsp;3.3.1</a>)
     2471      </p>
     2472      <p id="rfc.section.B.4.p.6">Require that invalid whitespace around field-names be rejected. (<a href="#message.headers" title="Message Headers">Section&nbsp;4.2</a>)
     2473      </p>
     2474      <p id="rfc.section.B.4.p.7">Update use of abs_path production from RFC1808 to the path-absolute + query components of RFC3986. (<a href="#request-target" title="request-target">Section&nbsp;5.1.2</a>)
     2475      </p>
     2476      <p id="rfc.section.B.4.p.8">Clarify exactly when close connection options must be sent. (<a href="#header.connection" id="rfc.xref.header.connection.8" title="Connection">Section&nbsp;8.1</a>)
    24702477      </p>
    24712478      <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a id="terminology" href="#terminology">Terminology</a></h1>
     
    27662773         </li>
    27672774      </ul>
    2768       <p id="rfc.section.D.7.p.2">Other changes: </p>
     2775      <p id="rfc.section.D.7.p.2">Ongoing work on ABNF conversion (&lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/36">http://tools.ietf.org/wg/httpbis/trac/ticket/36</a>&gt;):
     2776      </p>
     2777      <ul>
     2778         <li>Rewrite definition of list rules, deprecate empty list elements.</li>
     2779      </ul>
     2780      <p id="rfc.section.D.7.p.3">Other changes: </p>
    27692781      <ul>
    27702782         <li>Rewrite introduction; add mostly new Architecture Section.</li>
  • draft-ietf-httpbis/latest/p1-messaging.xml

    r398 r400  
    347347    A construct "#" is defined, similar to "*", for defining lists of
    348348    elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating at least
    349     &lt;n&gt; and at most &lt;m&gt; elements, each separated by one or more commas
    350     (",") and &OPTIONAL; linear white space (OWS). This makes the usual
    351     form of lists very easy; a rule such as
    352     <figure><artwork type="example">
    353  ( *<x:ref>OWS</x:ref> element *( *<x:ref>OWS</x:ref> "," *<x:ref>OWS</x:ref> element ))</artwork></figure>
     349    &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single comma
     350    (",") and optional whitespace (OWS).   
    354351  </t>
     352  <figure><preamble>
     353    Thus,
     354</preamble><artwork type="example">
     355  1#element =&gt; element *( OWS "," OWS element )
     356</artwork></figure>
     357  <figure><preamble>
     358    and:
     359</preamble><artwork type="example">
     360  #element =&gt; [ 1#element ]
     361</artwork></figure>
     362  <figure><preamble>
     363    and for n &gt;= 1 and m &gt; 1:
     364</preamble><artwork type="example">
     365  &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element )
     366</artwork></figure>
    355367  <t>
    356     can be shown as
    357     <figure><artwork type="example">
    358  1#element</artwork></figure>
     368    For compatibility with legacy list rules, recipients &SHOULD; accept empty
     369    list elements. In other words, consumers would follow the list productions:
    359370  </t>
    360   <t>
    361     Wherever this construct is used, null elements are allowed, but do
    362     not contribute to the count of elements present. That is,
    363     "(element), , (element) " is permitted, but counts as only two
    364     elements. Therefore, where at least one element is required, at
    365     least one non-null element &MUST; be present. Default values are 0
    366     and infinity so that "#element" allows any number, including zero;
    367     "1#element" requires at least one; and "1#2element" allows one or
    368     two.
    369   </t>
     371<figure><artwork type="example">
     372#element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
     373
     3741#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] )
     375</artwork></figure> 
    370376  <t>
    371377    <cref anchor="abnf.list">
     
    40824088<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
    40834089<t>
     4090  Empty list elements in list productions have been deprecated.
     4091  (<xref target="notation.abnf"/>)
     4092</t>
     4093<t>
    40844094  Rules about implicit linear white space between certain grammar productions
    40854095  have been removed; now it's only allowed when specifically pointed out
     
    46964706</t>
    46974707<t>
     4708  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
     4709  <list style="symbols">
     4710    <t>
     4711      Rewrite definition of list rules, deprecate empty list elements.
     4712    </t>
     4713  </list>
     4714</t>
     4715<t>
    46984716  Other changes:
    46994717  <list style="symbols">
Note: See TracChangeset for help on using the changeset viewer.