Changeset 1435 for draft-ietf-httpbis/latest/p1-messaging.xml
- Timestamp:
- 02/09/11 22:37:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p1-messaging.xml
r1432 r1435 492 492 <t> 493 493 HTTP is a stateless request/response protocol that operates by exchanging 494 messages across a reliable transport or session-layer 494 <x:dfn>messages</x:dfn> (<xref target="http.message"/>) across a reliable 495 transport or session-layer 495 496 "<x:dfn>connection</x:dfn>". An HTTP "<x:dfn>client</x:dfn>" is a 496 497 program that establishes a connection to a server for the purpose of … … 533 534 <t> 534 535 A client sends an HTTP request to the server in the form of a <x:dfn>request</x:dfn> 535 <x:dfn>message</x:dfn> (<xref target="request"/>), beginning with a method, URI, and 536 protocol version, followed by MIME-like header fields containing 537 request modifiers, client information, and payload metadata, an empty 538 line to indicate the end of the header section, and finally the payload 539 body (if any). 536 message, beginning with a request-line that includes a method, URI, and 537 protocol version (<xref target="request.line"/>), 538 followed by MIME-like header fields containing 539 request modifiers, client information, and payload metadata 540 (<xref target="header.fields"/>), 541 an empty line to indicate the end of the header section, and finally 542 a message body containing the payload body (if any, 543 <xref target="message.body"/>). 540 544 </t> 541 545 <t> 542 546 A server responds to the client's request by sending an HTTP <x:dfn>response</x:dfn> 543 <x:dfn>message</x:dfn> (<xref target="response"/>), beginning with a status line that547 message, beginning with a status line that 544 548 includes the protocol version, a success or error code, and textual 545 reason phrase, followed by MIME-like header fields containing server 546 information, resource metadata, and payload metadata, an empty line to 547 indicate the end of the header section, and finally the payload body (if any). 549 reason phrase (<xref target="status.line"/>), 550 followed by MIME-like header fields containing server 551 information, resource metadata, and payload metadata 552 (<xref target="header.fields"/>), 553 an empty line to indicate the end of the header section, and finally 554 a message body containing the payload body (if any, 555 <xref target="message.body"/>). 548 556 </t> 549 557 <t> … … 1011 1019 indicated resource, a client &MAY; attempt access by resolving 1012 1020 the host to an IP address, establishing a TCP connection to that address 1013 on the indicated port, and sending an HTTP request message to the server 1014 containing the URI's identifying data as described in <xref target="request"/>. 1021 on the indicated port, and sending an HTTP request message 1022 (<xref target="http.message"/>) containing the URI's identifying data 1023 (<xref target="message.routing"/>) to the server. 1015 1024 If the server responds to that request with a non-interim HTTP response 1016 message, as described in <xref target="response"/>, then that response1025 message, as described in &status-code-reasonphr;, then that response 1017 1026 is considered an authoritative answer to the client's request. 1018 1027 </t> … … 1162 1171 </t> 1163 1172 1164 <section anchor="start.line" title="Start Line"> 1173 <section title="Start Line" anchor="start.line"> 1174 <x:anchor-alias value="Start-Line"/> 1165 1175 <t> 1166 1176 An HTTP message can either be a request from client to server or a … … 1191 1201 </t> 1192 1202 1193 <section title="Request-Line" anchor="request-line"> 1203 <section title="Request-Line" anchor="request.line"> 1204 <x:anchor-alias value="Request"/> 1194 1205 <x:anchor-alias value="Request-Line"/> 1195 1206 <t> … … 1252 1263 </section> 1253 1264 1254 <section title="Status-Line" anchor="status-line"> 1265 <section title="Response Status-Line" anchor="status.line"> 1266 <x:anchor-alias value="Response"/> 1255 1267 <x:anchor-alias value="Status-Line"/> 1256 1268 <t> … … 1275 1287 <x:ref>Status-Code</x:ref> = 3<x:ref>DIGIT</x:ref> 1276 1288 </artwork></figure> 1277 <t>1278 The first digit of the Status-Code defines the class of response. The1279 last two digits do not have any categorization role. There are 51280 values for the first digit:1281 <list style="symbols">1282 <t>1283 1xx: Informational - Request received, continuing process1284 </t>1285 <t>1286 2xx: Success - The action was successfully received,1287 understood, and accepted1288 </t>1289 <t>1290 3xx: Redirection - Further action must be taken in order to1291 complete the request1292 </t>1293 <t>1294 4xx: Client Error - The request contains bad syntax or cannot1295 be fulfilled1296 </t>1297 <t>1298 5xx: Server Error - The server failed to fulfill an apparently1299 valid request1300 </t>1301 </list>1302 </t>1303 1289 </section> 1304 1290 … … 1783 1769 </section> 1784 1770 1785 <section title="Request" anchor="request"> 1786 <x:anchor-alias value="Request"/> 1787 <t> 1788 A request message from a client to a server begins with a 1789 Request-Line, followed by zero or more header fields, an empty 1790 line signifying the end of the header block, and an optional 1791 message body. 1792 </t> 1793 <!-- Host ; should be moved here eventually --> 1794 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Request"/> 1795 <x:ref>Request</x:ref> = <x:ref>Request-Line</x:ref> ; <xref target="request-line"/> 1796 *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> ) ; <xref target="header.fields"/> 1797 <x:ref>CRLF</x:ref> 1798 [ <x:ref>message-body</x:ref> ] ; <xref target="message.body"/> 1799 </artwork></figure> 1800 1801 <section title="Types of Request Target" anchor="request-target-types"> 1771 <section title="Message Routing" anchor="message.routing"> 1802 1772 <t> 1803 1773 In most cases, the user agent is provided a URI reference … … 1806 1776 of that URI is used to construct the HTTP request-target. 1807 1777 </t> 1778 1779 <section title="Types of Request Target" anchor="request-target-types"> 1808 1780 <t> 1809 1781 The four options for request-target are dependent on the nature of the … … 2031 2003 </t> 2032 2004 </section> 2033 2034 </section>2035 2036 2037 <section title="Response" anchor="response">2038 <x:anchor-alias value="Response"/>2039 <t>2040 After receiving and interpreting a request message, a server responds2041 with an HTTP response message.2042 </t>2043 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Response"/>2044 <x:ref>Response</x:ref> = <x:ref>Status-Line</x:ref> ; <xref target="status-line"/>2045 *( <x:ref>header-field</x:ref> <x:ref>CRLF</x:ref> ) ; <xref target="header.fields"/>2046 <x:ref>CRLF</x:ref>2047 [ <x:ref>message-body</x:ref> ] ; <xref target="message.body"/>2048 </artwork></figure>2049 2050 2005 </section> 2051 2006 … … 5323 5278 <x:ref>RWS</x:ref> = 1*( SP / HTAB / obs-fold ) 5324 5279 <x:ref>Reason-Phrase</x:ref> = *( HTAB / SP / VCHAR / obs-text ) 5325 <x:ref>Request</x:ref> = Request-Line *( header-field CRLF ) CRLF [ message-body ]5326 5280 <x:ref>Request-Line</x:ref> = Method SP request-target SP HTTP-Version CRLF 5327 <x:ref>Response</x:ref> = Status-Line *( header-field CRLF ) CRLF [ message-body ]5328 5281 5329 5282 <x:ref>Status-Code</x:ref> = 3DIGIT … … 5474 5427 ; HTTP-message defined but not used 5475 5428 ; Host defined but not used 5476 ; Request defined but not used5477 ; Response defined but not used5478 5429 ; TE defined but not used 5479 5430 ; Trailer defined but not used
Note: See TracChangeset
for help on using the changeset viewer.