Changeset 633


Ignore:
Timestamp:
Jul 27, 2009, 10:40:30 AM (10 years ago)
Author:
julian.reschke@…
Message:

Pimp up the example markup

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

Legend:

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

    r631 r633  
    837837         the payload body (if any).
    838838      </p>
     839      <p id="rfc.section.2.1.p.6">The following example illustrates a typical message exchange for a GET request on the URI "http://www.example.com/hello.txt":</p>
    839840      <div id="rfc.figure.u.13"></div>
    840       <p>The following example illustrates a typical message exchange for a GET request on the URI "http://www.example.com/hello.txt":</p><pre class="drawing">client request:
    841 
    842   GET /hello.txt HTTP/1.1
    843   User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
    844   Host: www.example.com
    845   Accept: */*
    846 
    847 server response:
    848 
    849   HTTP/1.1 200 OK
    850   Date: Mon, 27 Jul 2009 12:28:53 GMT
    851   Server: Apache
    852   Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
    853   ETag: "34aa387-d-1568eb00"
    854   Accept-Ranges: bytes
    855   Content-Length: 13
    856   Vary: Accept-Encoding
    857   Content-Type: text/plain
    858  
    859   Hello World!
    860 </pre><h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;<a id="intermediaries" href="#intermediaries">Intermediaries</a></h2>
     841      <p>client request:</p><pre class="text2">GET /hello.txt HTTP/1.1
     842User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
     843Host: www.example.com
     844Accept: */*
     845</pre><div id="rfc.figure.u.14"></div>
     846      <p>server response:</p><pre class="text">HTTP/1.1 200 OK
     847Date: Mon, 27 Jul 2009 12:28:53 GMT
     848Server: Apache
     849Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
     850ETag: "34aa387-d-1568eb00"
     851Accept-Ranges: bytes
     852Content-Length: 14
     853Vary: Accept-Encoding
     854Content-Type: text/plain
     855
     856<span id="exbody">Hello World!
     857</span></pre><h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;<a id="intermediaries" href="#intermediaries">Intermediaries</a></h2>
    861858      <p id="rfc.section.2.2.p.1">A more complicated situation occurs when one or more intermediaries are present in the request/response chain. There are three
    862859         common forms of intermediary: proxy, gateway, and tunnel. In some cases, a single intermediary may act as an origin server,
    863860         proxy, gateway, or tunnel, switching behavior based on the nature of each request.
    864861      </p>
    865       <div id="rfc.figure.u.14"></div><pre class="drawing">       request chain --------------------------------------&gt;
     862      <div id="rfc.figure.u.15"></div><pre class="drawing">       request chain --------------------------------------&gt;
    866863    UA -----v----- A -----v----- B -----v----- C -----v----- O
    867864       &lt;------------------------------------- response chain
     
    907904         from O (via C) for a request which has not been cached by UA or A.
    908905      </p>
    909       <div id="rfc.figure.u.15"></div><pre class="drawing">          request chain ----------&gt;
     906      <div id="rfc.figure.u.16"></div><pre class="drawing">          request chain ----------&gt;
    910907       UA -----v----- A -----v----- B - - - - - - C - - - - - - O
    911908          &lt;--------- response chain
     
    941938      </p>
    942939      <p id="rfc.section.2.5.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>
    943       <div id="rfc.figure.u.16"></div><pre class="inline"><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></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>
     940      <div id="rfc.figure.u.17"></div><pre class="inline"><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></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>
    944941  <a href="#http.version" class="smpl">HTTP-Prot-Name</a> = %x48.54.54.50 ; "HTTP", case-sensitive
    945942</pre><p id="rfc.section.2.5.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.
     
    970967         "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.
    971968      </p>
    972       <div id="rfc.figure.u.17"></div><pre class="inline"><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><span id="rfc.iref.g.30"></span><span id="rfc.iref.g.31"></span><span id="rfc.iref.g.32"></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;
     969      <div id="rfc.figure.u.18"></div><pre class="inline"><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><span id="rfc.iref.g.30"></span><span id="rfc.iref.g.31"></span><span id="rfc.iref.g.32"></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;
    973970  <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;
    974971  <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;
     
    996993         data corresponding to a resource for which that server might provide an HTTP interface.
    997994      </p>
    998       <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.33"></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> ]
     995      <div id="rfc.figure.u.19"></div><pre class="inline"><span id="rfc.iref.g.33"></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> ]
    999996</pre><p id="rfc.section.2.6.1.p.3">The host identifier within an <a href="#uri" class="smpl">authority</a> component is defined in <a href="#RFC3986" id="rfc.xref.RFC3986.16"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-3.2.2">Section 3.2.2</a>. If host is provided as an IP literal or IPv4 address, then the HTTP server is any listener on the indicated TCP port at
    1000997         that IP address. If host is a registered name, then that name is considered an indirect identifier and the recipient might
     
    10251022         port subcomponent is empty or not given.
    10261023      </p>
    1027       <div id="rfc.figure.u.19"></div><pre class="inline"><span id="rfc.iref.g.34"></span>  <a href="#https.uri" class="smpl">https-URI</a> = "https:" "//" <a href="#uri" class="smpl">authority</a> <a href="#uri" class="smpl">path-abempty</a> [ "?" <a href="#uri" class="smpl">query</a> ]
     1024      <div id="rfc.figure.u.20"></div><pre class="inline"><span id="rfc.iref.g.34"></span>  <a href="#https.uri" class="smpl">https-URI</a> = "https:" "//" <a href="#uri" class="smpl">authority</a> <a href="#uri" class="smpl">path-abempty</a> [ "?" <a href="#uri" class="smpl">query</a> ]
    10281025</pre><p id="rfc.section.2.6.2.p.3">The primary difference between the "http" and "https" schemes is that interaction with the latter is required to be secured
    10291026         for privacy through the use of strong encryption. The URI cannot be sent in a request until the connection is secure. Likewise,
     
    10431040      </p>
    10441041      <p id="rfc.section.2.6.3.p.3">For example, the following three URIs are equivalent:</p>
    1045       <div id="rfc.figure.u.20"></div><pre class="text">   http://example.com:80/~smith/home.html
     1042      <div id="rfc.figure.u.21"></div><pre class="text">   http://example.com:80/~smith/home.html
    10461043   http://EXAMPLE.com/%7Esmith/home.html
    10471044   http://EXAMPLE.com:/%7esmith/home.html
     
    10671064      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a id="message.types" href="#message.types">Message Types</a></h2>
    10681065      <p id="rfc.section.3.1.p.1">HTTP messages consist of requests from client to server and responses from server to client.</p>
    1069       <div id="rfc.figure.u.21"></div><pre class="inline"><span id="rfc.iref.g.35"></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
     1066      <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.35"></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
    10701067</pre><p id="rfc.section.3.1.p.3">Request (<a href="#request" title="Request">Section&nbsp;4</a>) and Response (<a href="#response" title="Response">Section&nbsp;5</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
    10711068         fields (also known as "headers"), an empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the header
    10721069         fields, and possibly a message-body.
    10731070      </p>
    1074       <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.36"></span><span id="rfc.iref.g.37"></span>  <a href="#message.types" class="smpl">generic-message</a> = <a href="#message.types" class="smpl">start-line</a>
     1071      <div id="rfc.figure.u.23"></div><pre class="inline"><span id="rfc.iref.g.36"></span><span id="rfc.iref.g.37"></span>  <a href="#message.types" class="smpl">generic-message</a> = <a href="#message.types" class="smpl">start-line</a>
    10751072                    *( <a href="#message.headers" class="smpl">message-header</a> <a href="#core.rules" class="smpl">CRLF</a> )
    10761073                    <a href="#core.rules" class="smpl">CRLF</a>
     
    10911088         case-insensitive.
    10921089      </p>
    1093       <div id="rfc.figure.u.23"></div><pre class="inline"><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>  <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
     1090      <div id="rfc.figure.u.24"></div><pre class="inline"><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>  <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
    10941091  <a href="#message.headers" class="smpl">field-name</a>     = <a href="#rule.token.separators" class="smpl">token</a>
    10951092  <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> )
     
    11161113         </p>
    11171114      </div>
    1118       <div id="rfc.figure.u.24"></div><pre class="inline"><span id="rfc.iref.g.42"></span><span id="rfc.iref.g.43"></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> ) ")"
     1115      <div id="rfc.figure.u.25"></div><pre class="inline"><span id="rfc.iref.g.42"></span><span id="rfc.iref.g.43"></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> ) ")"
    11191116  <a href="#rule.comment" class="smpl">ctext</a>          = <a href="#rule.whitespace" class="smpl">OWS</a> / %x21-27 / %x2A-5B / %x5D-7E / <a href="#rule.quoted-string" class="smpl">obs-text</a>
    11201117                 ; <a href="#rule.whitespace" class="smpl">OWS</a> / &lt;<a href="#core.rules" class="smpl">VCHAR</a> except "(", ")", and "\"&gt; / <a href="#rule.quoted-string" class="smpl">obs-text</a>
     
    11391136         header field (<a href="#header.transfer-encoding" id="rfc.xref.header.transfer-encoding.1" title="Transfer-Encoding">Section&nbsp;8.7</a>).
    11401137      </p>
    1141       <div id="rfc.figure.u.25"></div><pre class="inline"><span id="rfc.iref.g.44"></span>  <a href="#message.body" class="smpl">message-body</a> = <a href="#abnf.dependencies" class="smpl">entity-body</a>
     1138      <div id="rfc.figure.u.26"></div><pre class="inline"><span id="rfc.iref.g.44"></span>  <a href="#message.body" class="smpl">message-body</a> = <a href="#abnf.dependencies" class="smpl">entity-body</a>
    11421139               / &lt;entity-body encoded as per <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>&gt;
    11431140</pre><p id="rfc.section.3.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
     
    12061203         to the entity being transferred. These header fields apply only to the message being transmitted.
    12071204      </p>
    1208       <div id="rfc.figure.u.26"></div><pre class="inline"><span id="rfc.iref.g.45"></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 3.2</a>
     1205      <div id="rfc.figure.u.27"></div><pre class="inline"><span id="rfc.iref.g.45"></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 3.2</a>
    12091206                 / <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>
    12101207                 / <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>
     
    12231220         resource, the identifier of the resource, and the protocol version in use.
    12241221      </p>
    1225       <div id="rfc.figure.u.27"></div><pre class="inline"><span id="rfc.iref.g.46"></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;4.1</a>
     1222      <div id="rfc.figure.u.28"></div><pre class="inline"><span id="rfc.iref.g.46"></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;4.1</a>
    12261223                  *(( <a href="#general.header.fields" class="smpl">general-header</a>        ; <a href="#general.header.fields" title="General Header Fields">Section&nbsp;3.5</a>
    12271224                   / <a href="#abnf.dependencies" class="smpl">request-header</a>         ; <a href="#Part2" id="rfc.xref.Part2.3"><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 3</a>
     
    12331230         The elements are separated by SP characters. No CR or LF is allowed except in the final CRLF sequence.
    12341231      </p>
    1235       <div id="rfc.figure.u.28"></div><pre class="inline"><span id="rfc.iref.g.47"></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>
     1232      <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.47"></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>
    12361233</pre><h3 id="rfc.section.4.1.1"><a href="#rfc.section.4.1.1">4.1.1</a>&nbsp;<a id="method" href="#method">Method</a></h3>
    12371234      <p id="rfc.section.4.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>
    1238       <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.48"></span><span id="rfc.iref.g.49"></span>  <a href="#method" class="smpl">Method</a>         = <a href="#rule.token.separators" class="smpl">token</a>
     1235      <div id="rfc.figure.u.30"></div><pre class="inline"><span id="rfc.iref.g.48"></span><span id="rfc.iref.g.49"></span>  <a href="#method" class="smpl">Method</a>         = <a href="#rule.token.separators" class="smpl">token</a>
    12391236</pre><h3 id="rfc.section.4.1.2"><a href="#rfc.section.4.1.2">4.1.2</a>&nbsp;<a id="request-target" href="#request-target">request-target</a></h3>
    12401237      <p id="rfc.section.4.1.2.p.1">The request-target identifies the resource upon which to apply the request.</p>
    1241       <div id="rfc.figure.u.30"></div><pre class="inline"><span id="rfc.iref.g.50"></span>  <a href="#request-target" class="smpl">request-target</a> = "*"
     1238      <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.50"></span>  <a href="#request-target" class="smpl">request-target</a> = "*"
    12421239                 / <a href="#uri" class="smpl">absolute-URI</a>
    12431240                 / ( <a href="#uri" class="smpl">path-absolute</a> [ "?" <a href="#uri" class="smpl">query</a> ] )
     
    12471244         apply to a resource. One example would be
    12481245      </p>
    1249       <div id="rfc.figure.u.31"></div><pre class="text">  OPTIONS * HTTP/1.1
     1246      <div id="rfc.figure.u.32"></div><pre class="text">  OPTIONS * HTTP/1.1
    12501247</pre><p id="rfc.section.4.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,
    12511248         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
     
    12531250         Request-Line would be:
    12541251      </p>
    1255       <div id="rfc.figure.u.32"></div><pre class="text">  GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1
     1252      <div id="rfc.figure.u.33"></div><pre class="text">  GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1
    12561253</pre><p id="rfc.section.4.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.
    12571254      </p>
     
    12621259         server would create a TCP connection to port 80 of the host "www.example.org" and send the lines:
    12631260      </p>
    1264       <div id="rfc.figure.u.33"></div><pre class="text">  GET /pub/WWW/TheProject.html HTTP/1.1
     1261      <div id="rfc.figure.u.34"></div><pre class="text">  GET /pub/WWW/TheProject.html HTTP/1.1
    12651262  Host: www.example.org
    12661263</pre><p id="rfc.section.4.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
     
    12701267         asterisk form of request-target, then the last proxy on the request chain <em class="bcp14">MUST</em> forward the request with "*" as the final request-target.
    12711268      </p>
    1272       <div id="rfc.figure.u.34"></div>
     1269      <div id="rfc.figure.u.35"></div>
    12731270      <p>For example, the request</p><pre class="text">  OPTIONS http://www.example.org:8001 HTTP/1.1
    1274 </pre><div id="rfc.figure.u.35"></div>
     1271</pre><div id="rfc.figure.u.36"></div>
    12751272      <p>would be forwarded by the proxy as</p><pre class="text">  OPTIONS * HTTP/1.1
    12761273  Host: www.example.org:8001
     
    13151312      <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a id="response" href="#response">Response</a></h1>
    13161313      <p id="rfc.section.5.p.1">After receiving and interpreting a request message, a server responds with an HTTP response message.</p>
    1317       <div id="rfc.figure.u.36"></div><pre class="inline"><span id="rfc.iref.g.51"></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;5.1</a>
     1314      <div id="rfc.figure.u.37"></div><pre class="inline"><span id="rfc.iref.g.51"></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;5.1</a>
    13181315                  *(( <a href="#general.header.fields" class="smpl">general-header</a>        ; <a href="#general.header.fields" title="General Header Fields">Section&nbsp;3.5</a>
    13191316                   / <a href="#abnf.dependencies" class="smpl">response-header</a>        ; <a href="#Part2" id="rfc.xref.Part2.6"><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 5</a>
     
    13261323         CRLF sequence.
    13271324      </p>
    1328       <div id="rfc.figure.u.37"></div><pre class="inline"><span id="rfc.iref.g.52"></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>
     1325      <div id="rfc.figure.u.38"></div><pre class="inline"><span id="rfc.iref.g.52"></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>
    13291326</pre><h3 id="rfc.section.5.1.1"><a href="#rfc.section.5.1.1">5.1.1</a>&nbsp;<a id="status.code.and.reason.phrase" href="#status.code.and.reason.phrase">Status Code and Reason Phrase</a></h3>
    13301327      <p id="rfc.section.5.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
     
    13431340         <li>5xx: Server Error - The server failed to fulfill an apparently valid request</li>
    13441341      </ul>
    1345       <div id="rfc.figure.u.38"></div><pre class="inline"><span id="rfc.iref.g.53"></span><span id="rfc.iref.g.54"></span><span id="rfc.iref.g.55"></span>  <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a>    = 3<a href="#core.rules" class="smpl">DIGIT</a>
     1342      <div id="rfc.figure.u.39"></div><pre class="inline"><span id="rfc.iref.g.53"></span><span id="rfc.iref.g.54"></span><span id="rfc.iref.g.55"></span>  <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a>    = 3<a href="#core.rules" class="smpl">DIGIT</a>
    13461343  <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> )
    13471344</pre><h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="protocol.parameters" href="#protocol.parameters">Protocol Parameters</a></h1>
    13481345      <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;<a id="date.time.formats.full.date" href="#date.time.formats.full.date">Date/Time Formats: Full Date</a></h2>
    13491346      <p id="rfc.section.6.1.p.1">HTTP applications have historically allowed three different formats for the representation of date/time stamps:</p>
    1350       <div id="rfc.figure.u.39"></div><pre class="text">  Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
     1347      <div id="rfc.figure.u.40"></div><pre class="text">  Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 1123
    13511348  Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
    13521349  Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
     
    13581355         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.
    13591356      </p>
    1360       <div id="rfc.figure.u.40"></div><pre class="inline"><span id="rfc.iref.g.56"></span>  <a href="#date.time.formats.full.date" class="smpl">HTTP-date</a>    = <a href="#preferred.date.format" class="smpl">rfc1123-date</a> / <a href="#obsolete.date.formats" class="smpl">obs-date</a>
     1357      <div id="rfc.figure.u.41"></div><pre class="inline"><span id="rfc.iref.g.56"></span>  <a href="#date.time.formats.full.date" class="smpl">HTTP-date</a>    = <a href="#preferred.date.format" class="smpl">rfc1123-date</a> / <a href="#obsolete.date.formats" class="smpl">obs-date</a>
    13611358</pre><div id="preferred.date.format">
    13621359         <p id="rfc.section.6.1.p.6">                    Preferred format:</p>
    13631360      </div>
    1364       <div id="rfc.figure.u.41"></div><pre class="inline"><span id="rfc.iref.g.57"></span><span id="rfc.iref.g.58"></span><span id="rfc.iref.g.59"></span><span id="rfc.iref.g.60"></span><span id="rfc.iref.g.61"></span><span id="rfc.iref.g.62"></span><span id="rfc.iref.g.63"></span><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><span id="rfc.iref.g.68"></span>  <a href="#preferred.date.format" class="smpl">rfc1123-date</a> = <a href="#preferred.date.format" class="smpl">day-name</a> "," <a href="#core.rules" class="smpl">SP</a> date1 <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">GMT</a>
     1361      <div id="rfc.figure.u.42"></div><pre class="inline"><span id="rfc.iref.g.57"></span><span id="rfc.iref.g.58"></span><span id="rfc.iref.g.59"></span><span id="rfc.iref.g.60"></span><span id="rfc.iref.g.61"></span><span id="rfc.iref.g.62"></span><span id="rfc.iref.g.63"></span><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><span id="rfc.iref.g.68"></span>  <a href="#preferred.date.format" class="smpl">rfc1123-date</a> = <a href="#preferred.date.format" class="smpl">day-name</a> "," <a href="#core.rules" class="smpl">SP</a> date1 <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">GMT</a>
    13651362
    13661363  <a href="#preferred.date.format" class="smpl">day-name</a>     = %x4D.6F.6E ; "Mon", case-sensitive
     
    14031400         <p id="rfc.section.6.1.p.9">                Obsolete formats:</p>
    14041401      </div>
    1405       <div id="rfc.figure.u.42"></div><pre class="inline"><span id="rfc.iref.g.69"></span>  <a href="#obsolete.date.formats" class="smpl">obs-date</a>     = <a href="#obsolete.date.formats" class="smpl">rfc850-date</a> / <a href="#obsolete.date.formats" class="smpl">asctime-date</a>
    1406 </pre><div id="rfc.figure.u.43"></div><pre class="inline"><span id="rfc.iref.g.70"></span>  <a href="#obsolete.date.formats" class="smpl">rfc850-date</a>  = <a href="#obsolete.date.formats" class="smpl">day-name-l</a> "," <a href="#core.rules" class="smpl">SP</a> <a href="#obsolete.date.formats" class="smpl">date2</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">GMT</a>
     1402      <div id="rfc.figure.u.43"></div><pre class="inline"><span id="rfc.iref.g.69"></span>  <a href="#obsolete.date.formats" class="smpl">obs-date</a>     = <a href="#obsolete.date.formats" class="smpl">rfc850-date</a> / <a href="#obsolete.date.formats" class="smpl">asctime-date</a>
     1403</pre><div id="rfc.figure.u.44"></div><pre class="inline"><span id="rfc.iref.g.70"></span>  <a href="#obsolete.date.formats" class="smpl">rfc850-date</a>  = <a href="#obsolete.date.formats" class="smpl">day-name-l</a> "," <a href="#core.rules" class="smpl">SP</a> <a href="#obsolete.date.formats" class="smpl">date2</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">GMT</a>
    14071404  <a href="#obsolete.date.formats" class="smpl">date2</a>        = <a href="#preferred.date.format" class="smpl">day</a> "-" <a href="#preferred.date.format" class="smpl">month</a> "-" 2<a href="#core.rules" class="smpl">DIGIT</a>
    14081405                 ; day-month-year (e.g., 02-Jun-82)
     
    14151412         / %x53.61.74.75.72.64.61.79 ; "Saturday", case-sensitive
    14161413         / %x53.75.6E.64.61.79 ; "Sunday", case-sensitive
    1417 </pre><div id="rfc.figure.u.44"></div><pre class="inline"><span id="rfc.iref.g.71"></span>  <a href="#obsolete.date.formats" class="smpl">asctime-date</a> = <a href="#preferred.date.format" class="smpl">day-name</a> <a href="#core.rules" class="smpl">SP</a> <a href="#obsolete.date.formats" class="smpl">date3</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">year</a>
     1414</pre><div id="rfc.figure.u.45"></div><pre class="inline"><span id="rfc.iref.g.71"></span>  <a href="#obsolete.date.formats" class="smpl">asctime-date</a> = <a href="#preferred.date.format" class="smpl">day-name</a> <a href="#core.rules" class="smpl">SP</a> <a href="#obsolete.date.formats" class="smpl">date3</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#core.rules" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">year</a>
    14181415  <a href="#obsolete.date.formats" class="smpl">date3</a>        = <a href="#preferred.date.format" class="smpl">month</a> <a href="#core.rules" class="smpl">SP</a> ( 2<a href="#core.rules" class="smpl">DIGIT</a> / ( <a href="#core.rules" class="smpl">SP</a> 1<a href="#core.rules" class="smpl">DIGIT</a> ))
    14191416                 ; month day (e.g., Jun  2)
     
    14331430         is a property of the message, not of the original entity.
    14341431      </p>
    1435       <div id="rfc.figure.u.45"></div><pre class="inline"><span id="rfc.iref.g.72"></span><span id="rfc.iref.g.73"></span>  <a href="#transfer.codings" class="smpl">transfer-coding</a>         = "chunked" / <a href="#transfer.codings" class="smpl">transfer-extension</a>
     1432      <div id="rfc.figure.u.46"></div><pre class="inline"><span id="rfc.iref.g.72"></span><span id="rfc.iref.g.73"></span>  <a href="#transfer.codings" class="smpl">transfer-coding</a>         = "chunked" / <a href="#transfer.codings" class="smpl">transfer-extension</a>
    14361433  <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="#rule.parameter" class="smpl">transfer-parameter</a> )
    14371434</pre><div id="rule.parameter">
    14381435         <p id="rfc.section.6.2.p.3">      Parameters are in the form of attribute/value pairs.</p>
    14391436      </div>
    1440       <div id="rfc.figure.u.46"></div><pre class="inline"><span id="rfc.iref.g.74"></span><span id="rfc.iref.g.75"></span><span id="rfc.iref.g.76"></span><span id="rfc.iref.g.77"></span><span id="rfc.iref.g.78"></span>  <a href="#rule.parameter" class="smpl">transfer-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>
     1437      <div id="rfc.figure.u.47"></div><pre class="inline"><span id="rfc.iref.g.74"></span><span id="rfc.iref.g.75"></span><span id="rfc.iref.g.76"></span><span id="rfc.iref.g.77"></span><span id="rfc.iref.g.78"></span>  <a href="#rule.parameter" class="smpl">transfer-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>
    14411438  <a href="#rule.parameter" class="smpl">attribute</a>               = <a href="#rule.token.separators" class="smpl">token</a>
    14421439  <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>
     
    14631460         necessary for the recipient to verify that it has received the full message.
    14641461      </p>
    1465       <div id="rfc.figure.u.47"></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><span id="rfc.iref.g.82"></span><span id="rfc.iref.g.83"></span><span id="rfc.iref.g.84"></span><span id="rfc.iref.g.85"></span><span id="rfc.iref.g.86"></span><span id="rfc.iref.g.87"></span>  <a href="#chunked.transfer.encoding" class="smpl">Chunked-Body</a>   = *<a href="#chunked.transfer.encoding" class="smpl">chunk</a>
     1462      <div id="rfc.figure.u.48"></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><span id="rfc.iref.g.82"></span><span id="rfc.iref.g.83"></span><span id="rfc.iref.g.84"></span><span id="rfc.iref.g.85"></span><span id="rfc.iref.g.86"></span><span id="rfc.iref.g.87"></span>  <a href="#chunked.transfer.encoding" class="smpl">Chunked-Body</a>   = *<a href="#chunked.transfer.encoding" class="smpl">chunk</a>
    14661463                   <a href="#chunked.transfer.encoding" class="smpl">last-chunk</a>
    14671464                   <a href="#chunked.transfer.encoding" class="smpl">trailer-part</a>
     
    15011498      </p>
    15021499      <p id="rfc.section.6.2.1.p.7">A process for decoding the "chunked" transfer-coding can be represented in pseudo-code as:</p>
    1503       <div id="rfc.figure.u.48"></div><pre class="text">  length := 0
     1500      <div id="rfc.figure.u.49"></div><pre class="text">  length := 0
    15041501  read chunk-size, chunk-ext (if any) and CRLF
    15051502  while (chunk-size &gt; 0) {
     
    15231520         By convention, the products are listed in order of their significance for identifying the application.
    15241521      </p>
    1525       <div id="rfc.figure.u.49"></div><pre class="inline"><span id="rfc.iref.g.88"></span><span id="rfc.iref.g.89"></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>]
     1522      <div id="rfc.figure.u.50"></div><pre class="inline"><span id="rfc.iref.g.88"></span><span id="rfc.iref.g.89"></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>]
    15261523  <a href="#product.tokens" class="smpl">product-version</a> = <a href="#rule.token.separators" class="smpl">token</a>
    15271524</pre><p id="rfc.section.6.3.p.3">Examples:</p>
    1528       <div id="rfc.figure.u.50"></div><pre class="text">  User-Agent: CERN-LineMode/2.15 libwww/2.17b3
     1525      <div id="rfc.figure.u.51"></div><pre class="text">  User-Agent: CERN-LineMode/2.15 libwww/2.17b3
    15291526  Server: Apache/0.8.4
    15301527</pre><p id="rfc.section.6.3.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).
     
    15351532         a quality value of 0, then content with this parameter is `not acceptable' for the client. HTTP/1.1 applications <em class="bcp14">MUST NOT</em> generate more than three digits after the decimal point. User configuration of these values <em class="bcp14">SHOULD</em> also be limited in this fashion.
    15361533      </p>
    1537       <div id="rfc.figure.u.51"></div><pre class="inline"><span id="rfc.iref.g.90"></span>  <a href="#quality.values" class="smpl">qvalue</a>         = ( "0" [ "." 0*3<a href="#core.rules" class="smpl">DIGIT</a> ] )
     1534      <div id="rfc.figure.u.52"></div><pre class="inline"><span id="rfc.iref.g.90"></span>  <a href="#quality.values" class="smpl">qvalue</a>         = ( "0" [ "." 0*3<a href="#core.rules" class="smpl">DIGIT</a> ] )
    15381535                 / ( "1" [ "." 0*3("0") ] )
    15391536</pre><div class="note">
     
    17311728      </p>
    17321729      <p id="rfc.section.8.1.p.2">The Connection header's value has the following grammar:</p>
    1733       <div id="rfc.figure.u.52"></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.connection" class="smpl">Connection</a>       = "Connection" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.connection" class="smpl">Connection-v</a>
     1730      <div id="rfc.figure.u.53"></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.connection" class="smpl">Connection</a>       = "Connection" ":" <a href="#rule.whitespace" class="smpl">OWS</a> <a href="#header.connection" class="smpl">Connection-v</a>
    17341731  <a href="#header.connection" class="smpl">Connection-v</a>     = 1#<a href="#header.connection" class="smpl">connection-token</a>
    17351732  <a href="#header.connection" class="smpl">connection-token</a> = <a href="#rule.token.separators" class="smpl">token</a>
     
    17441741         of the response. For example,
    17451742      </p>
    1746       <div id="rfc.figure.u.53"></div><pre class="text">  Connection: close
     1743      <div id="rfc.figure.u.54"></div><pre class="text">  Connection: close
    17471744</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.
    17481745      </p>
     
    17601757         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.
    17611758      </p>
    1762       <div id="rfc.figure.u.54"></div><pre class="inline"><span id="rfc.iref.g.94"></span><span id="rfc.iref.g.95"></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>
     1759      <div id="rfc.figure.u.55"></div><pre class="inline"><span id="rfc.iref.g.94"></span><span id="rfc.iref.g.95"></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>
    17631760  <a href="#header.content-length" class="smpl">Content-Length-v</a> = 1*<a href="#core.rules" class="smpl">DIGIT</a>
    17641761</pre><p id="rfc.section.8.2.p.3">An example is</p>
    1765       <div id="rfc.figure.u.55"></div><pre class="text">  Content-Length: 3495
     1762      <div id="rfc.figure.u.56"></div><pre class="text">  Content-Length: 3495
    17661763</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;3.4</a>.
    17671764      </p>
     
    17781775         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.5"><cite title="Internet Message Format">[RFC5322]</cite></a>. The field value is an HTTP-date, as described in <a href="#date.time.formats.full.date" title="Date/Time Formats: Full Date">Section&nbsp;6.1</a>; it <em class="bcp14">MUST</em> be sent in rfc1123-date format.
    17791776      </p>
    1780       <div id="rfc.figure.u.56"></div><pre class="inline"><span id="rfc.iref.g.96"></span><span id="rfc.iref.g.97"></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>
     1777      <div id="rfc.figure.u.57"></div><pre class="inline"><span id="rfc.iref.g.96"></span><span id="rfc.iref.g.97"></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>
    17811778  <a href="#header.date" class="smpl">Date-v</a> = <a href="#date.time.formats.full.date" class="smpl">HTTP-date</a>
    17821779</pre><p id="rfc.section.8.3.p.3">An example is</p>
    1783       <div id="rfc.figure.u.57"></div><pre class="text">  Date: Tue, 15 Nov 1994 08:12:31 GMT
     1780      <div id="rfc.figure.u.58"></div><pre class="text">  Date: Tue, 15 Nov 1994 08:12:31 GMT
    17841781</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:
    17851782      </p>
     
    18171814         a single IP address.
    18181815      </p>
    1819       <div id="rfc.figure.u.58"></div><pre class="inline"><span id="rfc.iref.g.98"></span><span id="rfc.iref.g.99"></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>
     1816      <div id="rfc.figure.u.59"></div><pre class="inline"><span id="rfc.iref.g.98"></span><span id="rfc.iref.g.99"></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>
    18201817  <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.6.1</a>
    18211818</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
    18221819         URL). For example, a request on the origin server for &lt;http://www.example.org/pub/WWW/&gt; would properly include:
    18231820      </p>
    1824       <div id="rfc.figure.u.59"></div><pre class="text">  GET /pub/WWW/ HTTP/1.1
     1821      <div id="rfc.figure.u.60"></div><pre class="text">  GET /pub/WWW/ HTTP/1.1
    18251822  Host: www.example.org
    18261823</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
     
    18371834         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;6.2</a>).
    18381835      </p>
    1839       <div id="rfc.figure.u.60"></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>  <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>
     1836      <div id="rfc.figure.u.61"></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>  <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>
    18401837  <a href="#header.te" class="smpl">TE-v</a>      = #<a href="#header.te" class="smpl">t-codings</a>
    18411838  <a href="#header.te" class="smpl">t-codings</a> = "trailers" / ( <a href="#transfer.codings" class="smpl">transfer-extension</a> [ <a href="#header.te" class="smpl">te-params</a> ] )
     
    18461843      </p>
    18471844      <p id="rfc.section.8.5.p.4">Examples of its use are:</p>
    1848       <div id="rfc.figure.u.61"></div><pre class="text">  TE: deflate
     1845      <div id="rfc.figure.u.62"></div><pre class="text">  TE: deflate
    18491846  TE:
    18501847  TE: trailers, deflate;q=0.5
     
    18831880         chunked transfer-coding.
    18841881      </p>
    1885       <div id="rfc.figure.u.62"></div><pre class="inline"><span id="rfc.iref.g.105"></span><span id="rfc.iref.g.106"></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>
     1882      <div id="rfc.figure.u.63"></div><pre class="inline"><span id="rfc.iref.g.105"></span><span id="rfc.iref.g.106"></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>
    18861883  <a href="#header.trailer" class="smpl">Trailer-v</a> = 1#<a href="#message.headers" class="smpl">field-name</a>
    18871884</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
     
    19041901         transfer-coding is a property of the message, not of the entity.
    19051902      </p>
    1906       <div id="rfc.figure.u.63"></div><pre class="inline"><span id="rfc.iref.g.107"></span><span id="rfc.iref.g.108"></span>  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>   = "Transfer-Encoding" ":" <a href="#rule.whitespace" class="smpl">OWS</a>
     1903      <div id="rfc.figure.u.64"></div><pre class="inline"><span id="rfc.iref.g.107"></span><span id="rfc.iref.g.108"></span>  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>   = "Transfer-Encoding" ":" <a href="#rule.whitespace" class="smpl">OWS</a>
    19071904                        <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a>
    19081905  <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a> = 1#<a href="#transfer.codings" class="smpl">transfer-coding</a>
    19091906</pre><p id="rfc.section.8.7.p.3">Transfer-codings are defined in <a href="#transfer.codings" title="Transfer Codings">Section&nbsp;6.2</a>. An example is:
    19101907      </p>
    1911       <div id="rfc.figure.u.64"></div><pre class="text">  Transfer-Encoding: chunked
     1908      <div id="rfc.figure.u.65"></div><pre class="text">  Transfer-Encoding: chunked
    19121909</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.
    19131910      </p>
     
    19191916         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.
    19201917      </p>
    1921       <div id="rfc.figure.u.65"></div><pre class="inline"><span id="rfc.iref.g.109"></span><span id="rfc.iref.g.110"></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>
     1918      <div id="rfc.figure.u.66"></div><pre class="inline"><span id="rfc.iref.g.109"></span><span id="rfc.iref.g.110"></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>
    19221919  <a href="#header.upgrade" class="smpl">Upgrade-v</a> = 1#<a href="#product.tokens" class="smpl">product</a>
    19231920</pre><p id="rfc.section.8.8.p.3">For example,</p>
    1924       <div id="rfc.figure.u.66"></div><pre class="text">  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
     1921      <div id="rfc.figure.u.67"></div><pre class="text">  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
    19251922</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
    19261923         protocol. It does so by allowing the client to advertise its desire to use another protocol, such as a later version of HTTP
     
    19511948         of all senders along the request/response chain.
    19521949      </p>
    1953       <div id="rfc.figure.u.67"></div><pre class="inline"><span id="rfc.iref.g.111"></span><span id="rfc.iref.g.112"></span><span id="rfc.iref.g.113"></span><span id="rfc.iref.g.114"></span><span id="rfc.iref.g.115"></span><span id="rfc.iref.g.116"></span><span id="rfc.iref.g.117"></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>
     1950      <div id="rfc.figure.u.68"></div><pre class="inline"><span id="rfc.iref.g.111"></span><span id="rfc.iref.g.112"></span><span id="rfc.iref.g.113"></span><span id="rfc.iref.g.114"></span><span id="rfc.iref.g.115"></span><span id="rfc.iref.g.116"></span><span id="rfc.iref.g.117"></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>
    19541951  <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>
    19551952                          [ <a href="#rule.whitespace" class="smpl">RWS</a> <a href="#rule.comment" class="smpl">comment</a> ] )
     
    19761973         server at www.example.com. The request received by www.example.com would then have the following Via header field:
    19771974      </p>
    1978       <div id="rfc.figure.u.68"></div><pre class="text">  Via: 1.0 fred, 1.1 p.example.net (Apache/1.1)
     1975      <div id="rfc.figure.u.69"></div><pre class="text">  Via: 1.0 fred, 1.1 p.example.net (Apache/1.1)
    19791976</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.
    19801977      </p>
     
    19821979         For example,
    19831980      </p>
    1984       <div id="rfc.figure.u.69"></div><pre class="text">  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
     1981      <div id="rfc.figure.u.70"></div><pre class="text">  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
    19851982</pre><p id="rfc.section.8.9.p.12">could be collapsed to</p>
    1986       <div id="rfc.figure.u.70"></div><pre class="text">  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
     1983      <div id="rfc.figure.u.71"></div><pre class="text">  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy
    19871984</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
    19881985         by pseudonyms. Applications <em class="bcp14">MUST NOT</em> combine entries which have different received-protocol values.
     
    26242621      </dl>
    26252622      <h1 id="rfc.section.D"><a href="#rfc.section.D">D.</a>&nbsp;<a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1>
    2626       <div id="rfc.figure.u.71"></div> <pre class="inline"><a href="#rule.whitespace" class="smpl">BWS</a> = OWS
     2623      <div id="rfc.figure.u.72"></div> <pre class="inline"><a href="#rule.whitespace" class="smpl">BWS</a> = OWS
    26272624
    26282625<a href="#abnf.dependencies" class="smpl">Cache-Control</a> = &lt;Cache-Control, defined in [Part6], Section 3.4&gt;
     
    28092806
    28102807<a href="#preferred.date.format" class="smpl">year</a> = 4DIGIT
    2811 </pre> <div id="rfc.figure.u.72"></div>
     2808</pre> <div id="rfc.figure.u.73"></div>
    28122809      <p>ABNF diagnostics:</p><pre class="inline">; Chunked-Body defined but not used
    28132810; Content-Length defined but not used
  • draft-ietf-httpbis/latest/p1-messaging.xml

    r630 r633  
    557557   finally the payload body (if any).
    558558</t>
    559 <figure><preamble>
     559<t>
    560560   The following example illustrates a typical message exchange for a
    561561   GET request on the URI "http://www.example.com/hello.txt":
    562 </preamble><artwork type="drawing">
     562</t>
     563<figure><preamble>
    563564client request:
    564 
    565   GET /hello.txt HTTP/1.1
    566   User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
    567   Host: www.example.com
    568   Accept: */*
    569 
     565</preamble><artwork  type="message/http; msgtype=&#34;request&#34;" x:indent-with="  ">
     566GET /hello.txt HTTP/1.1
     567User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
     568Host: www.example.com
     569Accept: */*
     570</artwork></figure>
     571<figure><preamble>
    570572server response:
    571 
    572   HTTP/1.1 200 OK
    573   Date: Mon, 27 Jul 2009 12:28:53 GMT
    574   Server: Apache
    575   Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
    576   ETag: "34aa387-d-1568eb00"
    577   Accept-Ranges: bytes
    578   Content-Length: 13
    579   Vary: Accept-Encoding
    580   Content-Type: text/plain
    581  
    582   Hello World!
    583 </artwork></figure>
     573</preamble><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
     574HTTP/1.1 200 OK
     575Date: Mon, 27 Jul 2009 12:28:53 GMT
     576Server: Apache
     577Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
     578ETag: "34aa387-d-1568eb00"
     579Accept-Ranges: bytes
     580Content-Length: <x:length-of target="exbody"/>
     581Vary: Accept-Encoding
     582Content-Type: text/plain
     583
     584<x:span anchor="exbody">Hello World!
     585</x:span></artwork></figure>
    584586</section>
    585587
Note: See TracChangeset for help on using the changeset viewer.