Changeset 633 for draft-ietf-httpbis
- Timestamp:
- 27/07/09 17:40:30 (13 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p1-messaging.html
r631 r633 837 837 the payload body (if any). 838 838 </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> 839 840 <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> <a id="intermediaries" href="#intermediaries">Intermediaries</a></h2> 841 <p>client request:</p><pre class="text2">GET /hello.txt HTTP/1.1 842 User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 843 Host: www.example.com 844 Accept: */* 845 </pre><div id="rfc.figure.u.14"></div> 846 <p>server response:</p><pre class="text">HTTP/1.1 200 OK 847 Date: Mon, 27 Jul 2009 12:28:53 GMT 848 Server: Apache 849 Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT 850 ETag: "34aa387-d-1568eb00" 851 Accept-Ranges: bytes 852 Content-Length: 14 853 Vary: Accept-Encoding 854 Content-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> <a id="intermediaries" href="#intermediaries">Intermediaries</a></h2> 861 858 <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 862 859 common forms of intermediary: proxy, gateway, and tunnel. In some cases, a single intermediary may act as an origin server, 863 860 proxy, gateway, or tunnel, switching behavior based on the nature of each request. 864 861 </p> 865 <div id="rfc.figure.u.1 4"></div><pre class="drawing"> request chain -------------------------------------->862 <div id="rfc.figure.u.15"></div><pre class="drawing"> request chain --------------------------------------> 866 863 UA -----v----- A -----v----- B -----v----- C -----v----- O 867 864 <------------------------------------- response chain … … 907 904 from O (via C) for a request which has not been cached by UA or A. 908 905 </p> 909 <div id="rfc.figure.u.1 5"></div><pre class="drawing"> request chain ---------->906 <div id="rfc.figure.u.16"></div><pre class="drawing"> request chain ----------> 910 907 UA -----v----- A -----v----- B - - - - - - C - - - - - - O 911 908 <--------- response chain … … 941 938 </p> 942 939 <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.1 6"></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> 944 941 <a href="#http.version" class="smpl">HTTP-Prot-Name</a> = %x48.54.54.50 ; "HTTP", case-sensitive 945 942 </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. … … 970 967 "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. 971 968 </p> 972 <div id="rfc.figure.u.1 7"></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> = <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>>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> = <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>> 973 970 <a href="#uri" class="smpl">URI-reference</a> = <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>> 974 971 <a href="#uri" class="smpl">absolute-URI</a> = <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>> … … 996 993 data corresponding to a resource for which that server might provide an HTTP interface. 997 994 </p> 998 <div id="rfc.figure.u.1 8"></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> ] 999 996 </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 1000 997 that IP address. If host is a registered name, then that name is considered an indirect identifier and the recipient might … … 1025 1022 port subcomponent is empty or not given. 1026 1023 </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> ] 1028 1025 </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 1029 1026 for privacy through the use of strong encryption. The URI cannot be sent in a request until the connection is secure. Likewise, … … 1043 1040 </p> 1044 1041 <p id="rfc.section.2.6.3.p.3">For example, the following three URIs are equivalent:</p> 1045 <div id="rfc.figure.u.2 0"></div><pre class="text"> http://example.com:80/~smith/home.html1042 <div id="rfc.figure.u.21"></div><pre class="text"> http://example.com:80/~smith/home.html 1046 1043 http://EXAMPLE.com/%7Esmith/home.html 1047 1044 http://EXAMPLE.com:/%7esmith/home.html … … 1067 1064 <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> <a id="message.types" href="#message.types">Message Types</a></h2> 1068 1065 <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.2 1"></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 messages1066 <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 1070 1067 </pre><p id="rfc.section.3.1.p.3">Request (<a href="#request" title="Request">Section 4</a>) and Response (<a href="#response" title="Response">Section 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 1071 1068 fields (also known as "headers"), an empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the header 1072 1069 fields, and possibly a message-body. 1073 1070 </p> 1074 <div id="rfc.figure.u.2 2"></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> 1075 1072 *( <a href="#message.headers" class="smpl">message-header</a> <a href="#core.rules" class="smpl">CRLF</a> ) 1076 1073 <a href="#core.rules" class="smpl">CRLF</a> … … 1091 1088 case-insensitive. 1092 1089 </p> 1093 <div id="rfc.figure.u.2 3"></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> ] OWS1090 <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 1094 1091 <a href="#message.headers" class="smpl">field-name</a> = <a href="#rule.token.separators" class="smpl">token</a> 1095 1092 <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> ) … … 1116 1113 </p> 1117 1114 </div> 1118 <div id="rfc.figure.u.2 4"></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> ) ")" 1119 1116 <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> 1120 1117 ; <a href="#rule.whitespace" class="smpl">OWS</a> / <<a href="#core.rules" class="smpl">VCHAR</a> except "(", ")", and "\"> / <a href="#rule.quoted-string" class="smpl">obs-text</a> … … 1139 1136 header field (<a href="#header.transfer-encoding" id="rfc.xref.header.transfer-encoding.1" title="Transfer-Encoding">Section 8.7</a>). 1140 1137 </p> 1141 <div id="rfc.figure.u.2 5"></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> 1142 1139 / <entity-body encoded as per <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>> 1143 1140 </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 … … 1206 1203 to the entity being transferred. These header fields apply only to the message being transmitted. 1207 1204 </p> 1208 <div id="rfc.figure.u.2 6"></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> 1209 1206 / <a href="#header.connection" class="smpl">Connection</a> ; <a href="#header.connection" id="rfc.xref.header.connection.1" title="Connection">Section 8.1</a> 1210 1207 / <a href="#header.date" class="smpl">Date</a> ; <a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section 8.3</a> … … 1223 1220 resource, the identifier of the resource, and the protocol version in use. 1224 1221 </p> 1225 <div id="rfc.figure.u.2 7"></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 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 4.1</a> 1226 1223 *(( <a href="#general.header.fields" class="smpl">general-header</a> ; <a href="#general.header.fields" title="General Header Fields">Section 3.5</a> 1227 1224 / <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> … … 1233 1230 The elements are separated by SP characters. No CR or LF is allowed except in the final CRLF sequence. 1234 1231 </p> 1235 <div id="rfc.figure.u.2 8"></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> 1236 1233 </pre><h3 id="rfc.section.4.1.1"><a href="#rfc.section.4.1.1">4.1.1</a> <a id="method" href="#method">Method</a></h3> 1237 1234 <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> 1239 1236 </pre><h3 id="rfc.section.4.1.2"><a href="#rfc.section.4.1.2">4.1.2</a> <a id="request-target" href="#request-target">request-target</a></h3> 1240 1237 <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.3 0"></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> = "*" 1242 1239 / <a href="#uri" class="smpl">absolute-URI</a> 1243 1240 / ( <a href="#uri" class="smpl">path-absolute</a> [ "?" <a href="#uri" class="smpl">query</a> ] ) … … 1247 1244 apply to a resource. One example would be 1248 1245 </p> 1249 <div id="rfc.figure.u.3 1"></div><pre class="text"> OPTIONS * HTTP/1.11246 <div id="rfc.figure.u.32"></div><pre class="text"> OPTIONS * HTTP/1.1 1250 1247 </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, 1251 1248 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 … … 1253 1250 Request-Line would be: 1254 1251 </p> 1255 <div id="rfc.figure.u.3 2"></div><pre class="text"> GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.11252 <div id="rfc.figure.u.33"></div><pre class="text"> GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1 1256 1253 </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. 1257 1254 </p> … … 1262 1259 server would create a TCP connection to port 80 of the host "www.example.org" and send the lines: 1263 1260 </p> 1264 <div id="rfc.figure.u.3 3"></div><pre class="text"> GET /pub/WWW/TheProject.html HTTP/1.11261 <div id="rfc.figure.u.34"></div><pre class="text"> GET /pub/WWW/TheProject.html HTTP/1.1 1265 1262 Host: www.example.org 1266 1263 </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 … … 1270 1267 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. 1271 1268 </p> 1272 <div id="rfc.figure.u.3 4"></div>1269 <div id="rfc.figure.u.35"></div> 1273 1270 <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.3 5"></div>1271 </pre><div id="rfc.figure.u.36"></div> 1275 1272 <p>would be forwarded by the proxy as</p><pre class="text"> OPTIONS * HTTP/1.1 1276 1273 Host: www.example.org:8001 … … 1315 1312 <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a id="response" href="#response">Response</a></h1> 1316 1313 <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.3 6"></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 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 5.1</a> 1318 1315 *(( <a href="#general.header.fields" class="smpl">general-header</a> ; <a href="#general.header.fields" title="General Header Fields">Section 3.5</a> 1319 1316 / <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> … … 1326 1323 CRLF sequence. 1327 1324 </p> 1328 <div id="rfc.figure.u.3 7"></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> 1329 1326 </pre><h3 id="rfc.section.5.1.1"><a href="#rfc.section.5.1.1">5.1.1</a> <a id="status.code.and.reason.phrase" href="#status.code.and.reason.phrase">Status Code and Reason Phrase</a></h3> 1330 1327 <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 … … 1343 1340 <li>5xx: Server Error - The server failed to fulfill an apparently valid request</li> 1344 1341 </ul> 1345 <div id="rfc.figure.u.3 8"></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> 1346 1343 <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> ) 1347 1344 </pre><h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id="protocol.parameters" href="#protocol.parameters">Protocol Parameters</a></h1> 1348 1345 <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> <a id="date.time.formats.full.date" href="#date.time.formats.full.date">Date/Time Formats: Full Date</a></h2> 1349 1346 <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 11231347 <div id="rfc.figure.u.40"></div><pre class="text"> Sun, 06 Nov 1994 08:49:37 GMT ; RFC 1123 1351 1348 Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format 1352 1349 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format … … 1358 1355 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. 1359 1356 </p> 1360 <div id="rfc.figure.u.4 0"></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> 1361 1358 </pre><div id="preferred.date.format"> 1362 1359 <p id="rfc.section.6.1.p.6"> Preferred format:</p> 1363 1360 </div> 1364 <div id="rfc.figure.u.4 1"></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> 1365 1362 1366 1363 <a href="#preferred.date.format" class="smpl">day-name</a> = %x4D.6F.6E ; "Mon", case-sensitive … … 1403 1400 <p id="rfc.section.6.1.p.9"> Obsolete formats:</p> 1404 1401 </div> 1405 <div id="rfc.figure.u.4 2"></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.4 3"></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> 1407 1404 <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> 1408 1405 ; day-month-year (e.g., 02-Jun-82) … … 1415 1412 / %x53.61.74.75.72.64.61.79 ; "Saturday", case-sensitive 1416 1413 / %x53.75.6E.64.61.79 ; "Sunday", case-sensitive 1417 </pre><div id="rfc.figure.u.4 4"></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> 1418 1415 <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> )) 1419 1416 ; month day (e.g., Jun 2) … … 1433 1430 is a property of the message, not of the original entity. 1434 1431 </p> 1435 <div id="rfc.figure.u.4 5"></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> 1436 1433 <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> ) 1437 1434 </pre><div id="rule.parameter"> 1438 1435 <p id="rfc.section.6.2.p.3"> Parameters are in the form of attribute/value pairs.</p> 1439 1436 </div> 1440 <div id="rfc.figure.u.4 6"></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> 1441 1438 <a href="#rule.parameter" class="smpl">attribute</a> = <a href="#rule.token.separators" class="smpl">token</a> 1442 1439 <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> … … 1463 1460 necessary for the recipient to verify that it has received the full message. 1464 1461 </p> 1465 <div id="rfc.figure.u.4 7"></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> 1466 1463 <a href="#chunked.transfer.encoding" class="smpl">last-chunk</a> 1467 1464 <a href="#chunked.transfer.encoding" class="smpl">trailer-part</a> … … 1501 1498 </p> 1502 1499 <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.4 8"></div><pre class="text"> length := 01500 <div id="rfc.figure.u.49"></div><pre class="text"> length := 0 1504 1501 read chunk-size, chunk-ext (if any) and CRLF 1505 1502 while (chunk-size > 0) { … … 1523 1520 By convention, the products are listed in order of their significance for identifying the application. 1524 1521 </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>] 1526 1523 <a href="#product.tokens" class="smpl">product-version</a> = <a href="#rule.token.separators" class="smpl">token</a> 1527 1524 </pre><p id="rfc.section.6.3.p.3">Examples:</p> 1528 <div id="rfc.figure.u.5 0"></div><pre class="text"> User-Agent: CERN-LineMode/2.15 libwww/2.17b31525 <div id="rfc.figure.u.51"></div><pre class="text"> User-Agent: CERN-LineMode/2.15 libwww/2.17b3 1529 1526 Server: Apache/0.8.4 1530 1527 </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). … … 1535 1532 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. 1536 1533 </p> 1537 <div id="rfc.figure.u.5 1"></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> ] ) 1538 1535 / ( "1" [ "." 0*3("0") ] ) 1539 1536 </pre><div class="note"> … … 1731 1728 </p> 1732 1729 <p id="rfc.section.8.1.p.2">The Connection header's value has the following grammar:</p> 1733 <div id="rfc.figure.u.5 2"></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> 1734 1731 <a href="#header.connection" class="smpl">Connection-v</a> = 1#<a href="#header.connection" class="smpl">connection-token</a> 1735 1732 <a href="#header.connection" class="smpl">connection-token</a> = <a href="#rule.token.separators" class="smpl">token</a> … … 1744 1741 of the response. For example, 1745 1742 </p> 1746 <div id="rfc.figure.u.5 3"></div><pre class="text"> Connection: close1743 <div id="rfc.figure.u.54"></div><pre class="text"> Connection: close 1747 1744 </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 7.1</a>) after the current request/response is complete. 1748 1745 </p> … … 1760 1757 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. 1761 1758 </p> 1762 <div id="rfc.figure.u.5 4"></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> 1763 1760 <a href="#header.content-length" class="smpl">Content-Length-v</a> = 1*<a href="#core.rules" class="smpl">DIGIT</a> 1764 1761 </pre><p id="rfc.section.8.2.p.3">An example is</p> 1765 <div id="rfc.figure.u.5 5"></div><pre class="text"> Content-Length: 34951762 <div id="rfc.figure.u.56"></div><pre class="text"> Content-Length: 3495 1766 1763 </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 3.4</a>. 1767 1764 </p> … … 1778 1775 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 6.1</a>; it <em class="bcp14">MUST</em> be sent in rfc1123-date format. 1779 1776 </p> 1780 <div id="rfc.figure.u.5 6"></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> 1781 1778 <a href="#header.date" class="smpl">Date-v</a> = <a href="#date.time.formats.full.date" class="smpl">HTTP-date</a> 1782 1779 </pre><p id="rfc.section.8.3.p.3">An example is</p> 1783 <div id="rfc.figure.u.5 7"></div><pre class="text"> Date: Tue, 15 Nov 1994 08:12:31 GMT1780 <div id="rfc.figure.u.58"></div><pre class="text"> Date: Tue, 15 Nov 1994 08:12:31 GMT 1784 1781 </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: 1785 1782 </p> … … 1817 1814 a single IP address. 1818 1815 </p> 1819 <div id="rfc.figure.u.5 8"></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> 1820 1817 <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 2.6.1</a> 1821 1818 </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 1822 1819 URL). For example, a request on the origin server for <http://www.example.org/pub/WWW/> would properly include: 1823 1820 </p> 1824 <div id="rfc.figure.u. 59"></div><pre class="text"> GET /pub/WWW/ HTTP/1.11821 <div id="rfc.figure.u.60"></div><pre class="text"> GET /pub/WWW/ HTTP/1.1 1825 1822 Host: www.example.org 1826 1823 </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 … … 1837 1834 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 6.2</a>). 1838 1835 </p> 1839 <div id="rfc.figure.u.6 0"></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> 1840 1837 <a href="#header.te" class="smpl">TE-v</a> = #<a href="#header.te" class="smpl">t-codings</a> 1841 1838 <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> ] ) … … 1846 1843 </p> 1847 1844 <p id="rfc.section.8.5.p.4">Examples of its use are:</p> 1848 <div id="rfc.figure.u.6 1"></div><pre class="text"> TE: deflate1845 <div id="rfc.figure.u.62"></div><pre class="text"> TE: deflate 1849 1846 TE: 1850 1847 TE: trailers, deflate;q=0.5 … … 1883 1880 chunked transfer-coding. 1884 1881 </p> 1885 <div id="rfc.figure.u.6 2"></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> 1886 1883 <a href="#header.trailer" class="smpl">Trailer-v</a> = 1#<a href="#message.headers" class="smpl">field-name</a> 1887 1884 </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 … … 1904 1901 transfer-coding is a property of the message, not of the entity. 1905 1902 </p> 1906 <div id="rfc.figure.u.6 3"></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> 1907 1904 <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a> 1908 1905 <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding-v</a> = 1#<a href="#transfer.codings" class="smpl">transfer-coding</a> 1909 1906 </pre><p id="rfc.section.8.7.p.3">Transfer-codings are defined in <a href="#transfer.codings" title="Transfer Codings">Section 6.2</a>. An example is: 1910 1907 </p> 1911 <div id="rfc.figure.u.6 4"></div><pre class="text"> Transfer-Encoding: chunked1908 <div id="rfc.figure.u.65"></div><pre class="text"> Transfer-Encoding: chunked 1912 1909 </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. 1913 1910 </p> … … 1919 1916 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. 1920 1917 </p> 1921 <div id="rfc.figure.u.6 5"></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> 1922 1919 <a href="#header.upgrade" class="smpl">Upgrade-v</a> = 1#<a href="#product.tokens" class="smpl">product</a> 1923 1920 </pre><p id="rfc.section.8.8.p.3">For example,</p> 1924 <div id="rfc.figure.u.6 6"></div><pre class="text"> Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x111921 <div id="rfc.figure.u.67"></div><pre class="text"> Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 1925 1922 </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 1926 1923 protocol. It does so by allowing the client to advertise its desire to use another protocol, such as a later version of HTTP … … 1951 1948 of all senders along the request/response chain. 1952 1949 </p> 1953 <div id="rfc.figure.u.6 7"></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> 1954 1951 <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> 1955 1952 [ <a href="#rule.whitespace" class="smpl">RWS</a> <a href="#rule.comment" class="smpl">comment</a> ] ) … … 1976 1973 server at www.example.com. The request received by www.example.com would then have the following Via header field: 1977 1974 </p> 1978 <div id="rfc.figure.u.6 8"></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) 1979 1976 </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. 1980 1977 </p> … … 1982 1979 For example, 1983 1980 </p> 1984 <div id="rfc.figure.u. 69"></div><pre class="text"> Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy1981 <div id="rfc.figure.u.70"></div><pre class="text"> Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy 1985 1982 </pre><p id="rfc.section.8.9.p.12">could be collapsed to</p> 1986 <div id="rfc.figure.u.7 0"></div><pre class="text"> Via: 1.0 ricky, 1.1 mertz, 1.0 lucy1983 <div id="rfc.figure.u.71"></div><pre class="text"> Via: 1.0 ricky, 1.1 mertz, 1.0 lucy 1987 1984 </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 1988 1985 by pseudonyms. Applications <em class="bcp14">MUST NOT</em> combine entries which have different received-protocol values. … … 2624 2621 </dl> 2625 2622 <h1 id="rfc.section.D"><a href="#rfc.section.D">D.</a> <a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1> 2626 <div id="rfc.figure.u.7 1"></div> <pre class="inline"><a href="#rule.whitespace" class="smpl">BWS</a> = OWS2623 <div id="rfc.figure.u.72"></div> <pre class="inline"><a href="#rule.whitespace" class="smpl">BWS</a> = OWS 2627 2624 2628 2625 <a href="#abnf.dependencies" class="smpl">Cache-Control</a> = <Cache-Control, defined in [Part6], Section 3.4> … … 2809 2806 2810 2807 <a href="#preferred.date.format" class="smpl">year</a> = 4DIGIT 2811 </pre> <div id="rfc.figure.u.7 2"></div>2808 </pre> <div id="rfc.figure.u.73"></div> 2812 2809 <p>ABNF diagnostics:</p><pre class="inline">; Chunked-Body defined but not used 2813 2810 ; Content-Length defined but not used -
draft-ietf-httpbis/latest/p1-messaging.xml
r630 r633 557 557 finally the payload body (if any). 558 558 </t> 559 < figure><preamble>559 <t> 560 560 The following example illustrates a typical message exchange for a 561 561 GET request on the URI "http://www.example.com/hello.txt": 562 </preamble><artwork type="drawing"> 562 </t> 563 <figure><preamble> 563 564 client 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="request"" x:indent-with=" "> 566 GET /hello.txt HTTP/1.1 567 User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 568 Host: www.example.com 569 Accept: */* 570 </artwork></figure> 571 <figure><preamble> 570 572 server response: 571 572 573 574 575 576 577 578 Content-Length: 13 579 580 581 582 583 </ artwork></figure>573 </preamble><artwork type="message/http; msgtype="response"" x:indent-with=" "> 574 HTTP/1.1 200 OK 575 Date: Mon, 27 Jul 2009 12:28:53 GMT 576 Server: Apache 577 Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT 578 ETag: "34aa387-d-1568eb00" 579 Accept-Ranges: bytes 580 Content-Length: <x:length-of target="exbody"/> 581 Vary: Accept-Encoding 582 Content-Type: text/plain 583 584 <x:span anchor="exbody">Hello World! 585 </x:span></artwork></figure> 584 586 </section> 585 587
Note: See TracChangeset
for help on using the changeset viewer.