Changeset 875 for draft-ietf-httpbis/latest/p2-semantics.html
- Timestamp:
- 23/07/10 05:43:59 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p2-semantics.html
r868 r875 551 551 </li> 552 552 <li class="tocline0">5. <a href="#response.header.fields">Response Header Fields</a></li> 553 <li class="tocline0">6. <a href="# entity">Representation</a><ul class="toc">553 <li class="tocline0">6. <a href="#representation">Representation</a><ul class="toc"> 554 554 <li class="tocline1">6.1 <a href="#identifying.response.associated.with.representation">Identifying the Resource Associated with a Representation</a></li> 555 555 </ul> … … 903 903 fields. Unrecognized header fields are treated as entity-header fields. 904 904 </p> 905 <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id=" entity" href="#entity">Representation</a></h1>905 <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id="representation" href="#representation">Representation</a></h1> 906 906 <p id="rfc.section.6.p.1">Request and Response messages <em class="bcp14">MAY</em> transfer a representation if not otherwise restricted by the request method or response status code. A representation consists 907 907 of metadata (representation header fields) and data (representation body). When a complete or partial representation is enclosed … … 968 968 </p> 969 969 <p id="rfc.section.7.2.p.2">Responses to this method are not cacheable.</p> 970 <p id="rfc.section.7.2.p.3">If the OPTIONS request includes a n entity-body (as indicated by the presence of Content-Length or Transfer-Encoding), then970 <p id="rfc.section.7.2.p.3">If the OPTIONS request includes a message-body (as indicated by the presence of Content-Length or Transfer-Encoding), then 971 971 the media type <em class="bcp14">MUST</em> be indicated by a Content-Type field. Although this specification does not define any use for such a body, future extensions 972 972 to HTTP might use the OPTIONS body to make more detailed queries on the server. … … 991 991 <div id="rfc.iref.g.8"></div> 992 992 <div id="rfc.iref.m.2"></div> 993 <p id="rfc.section.7.3.p.1">The GET method means retrieve whatever information (in the form of a n entity) currently corresponds to the resource identified994 by the Effective Request URI.993 <p id="rfc.section.7.3.p.1">The GET method means retrieve whatever information (in the form of a representation) currently corresponds to the resource 994 identified by the Effective Request URI. 995 995 </p> 996 996 <p id="rfc.section.7.3.p.2">If the Effective Request URI identifies a data-producing process, it is the produced data which shall be returned as the representation … … 1000 1000 If-Match, If-None-Match, or If-Range header field. A conditional GET method requests that the representation be transferred 1001 1001 only under the circumstances described by the conditional header field(s). The conditional GET method is intended to reduce 1002 unnecessary network usage by allowing cached entities to be refreshed without requiring multiple requests or transferring1002 unnecessary network usage by allowing cached representations to be refreshed without requiring multiple requests or transferring 1003 1003 data already held by the client. 1004 1004 </p> … … 1018 1018 hypertext links for validity, accessibility, and recent modification. 1019 1019 </p> 1020 <p id="rfc.section.7.4.p.2">The response to a HEAD request <em class="bcp14">MAY</em> be cacheable in the sense that the information contained in the response <em class="bcp14">MAY</em> be used to update a previously cached entity from that resource. If the new field values indicate that the cached entity differs1021 from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or Last-Modified), then the1022 cache <em class="bcp14">MUST</em> treat the cache entry as stale.1020 <p id="rfc.section.7.4.p.2">The response to a HEAD request <em class="bcp14">MAY</em> be cacheable in the sense that the information contained in the response <em class="bcp14">MAY</em> be used to update a previously cached representation from that resource. If the new field values indicate that the cached 1021 representation differs from the current representation (as would be indicated by a change in Content-Length, Content-MD5, 1022 ETag or Last-Modified), then the cache <em class="bcp14">MUST</em> treat the cache entry as stale. 1023 1023 </p> 1024 1024 <div id="rfc.iref.p.1"></div> 1025 1025 <div id="rfc.iref.m.4"></div> 1026 1026 <h2 id="rfc.section.7.5"><a href="#rfc.section.7.5">7.5</a> <a id="POST" href="#POST">POST</a></h2> 1027 <p id="rfc.section.7.5.p.1">The POST method is used to request that the origin server accept the entity enclosed in the request as data to be processed1028 by the resource identified by the Effective Request URI. POST is designed to allow a uniform method to cover the following1029 f unctions:1027 <p id="rfc.section.7.5.p.1">The POST method is used to request that the origin server accept the representation enclosed in the request as data to be 1028 processed by the resource identified by the Effective Request URI. POST is designed to allow a uniform method to cover the 1029 following functions: 1030 1030 </p> 1031 1031 <ul> … … 1039 1039 </p> 1040 1040 <p id="rfc.section.7.5.p.3">The action performed by the POST method might not result in a resource that can be identified by a URI. In this case, either 1041 200 (OK) or 204 (No Content) is the appropriate response status, depending on whether or not the response includes a n entity1041 200 (OK) or 204 (No Content) is the appropriate response status, depending on whether or not the response includes a representation 1042 1042 that describes the result. 1043 1043 </p> 1044 <p id="rfc.section.7.5.p.4">If a resource has been created on the origin server, the response <em class="bcp14">SHOULD</em> be 201 (Created) and contain a n entity which describes the status of the request and refers to the new resource, and a Location1045 header (see <a href="#header.location" id="rfc.xref.header.location.2" title="Location">Section 9.4</a>).1044 <p id="rfc.section.7.5.p.4">If a resource has been created on the origin server, the response <em class="bcp14">SHOULD</em> be 201 (Created) and contain a representation which describes the status of the request and refers to the new resource, and 1045 a Location header (see <a href="#header.location" id="rfc.xref.header.location.2" title="Location">Section 9.4</a>). 1046 1046 </p> 1047 1047 <p id="rfc.section.7.5.p.5">Responses to this method are not cacheable, unless the response includes appropriate Cache-Control or Expires header fields. … … 1085 1085 location. 1086 1086 </p> 1087 <p id="rfc.section.7.7.p.2">A successful response <em class="bcp14">SHOULD</em> be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if the action has not yet been enacted,1088 or 204 (No Content) if the action has been enacted but the response does not include a representation.1089 </p> 1090 <p id="rfc.section.7.7.p.3">If the request passes through a cache and the Effective Request URI identifies one or more currently cached entities, those1091 entries <em class="bcp14">SHOULD</em> be treated as stale. Responses to this method are not cacheable.1087 <p id="rfc.section.7.7.p.2">A successful response <em class="bcp14">SHOULD</em> be 200 (OK) if the response includes an representation describing the status, 202 (Accepted) if the action has not yet been 1088 enacted, or 204 (No Content) if the action has been enacted but the response does not include a representation. 1089 </p> 1090 <p id="rfc.section.7.7.p.3">If the request passes through a cache and the Effective Request URI identifies one or more currently cached representations, 1091 those entries <em class="bcp14">SHOULD</em> be treated as stale. Responses to the DELETE method <em class="bcp14">MUST NOT</em> be cached. 1092 1092 </p> 1093 1093 <h2 id="rfc.section.7.8"><a href="#rfc.section.7.8">7.8</a> <a id="TRACE" href="#TRACE">TRACE</a></h2> … … 1095 1095 <div id="rfc.iref.m.7"></div> 1096 1096 <p id="rfc.section.7.8.p.1">The TRACE method is used to invoke a remote, application-layer loop-back of the request message. The final recipient of the 1097 request <em class="bcp14">SHOULD</em> reflect the message received back to the client as the entity-body of a 200 (OK) response. The final recipient is either the1098 origin server or the first proxy or gateway to receive a Max-Forwards value of zero (0) in the request (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.2" title="Max-Forwards">Section 9.5</a>). A TRACE request <em class="bcp14">MUST NOT</em> include a message-body.1097 request <em class="bcp14">SHOULD</em> reflect the message received back to the client as the message-body of a 200 (OK) response. The final recipient is either 1098 the origin server or the first proxy or gateway to receive a Max-Forwards value of zero (0) in the request (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.2" title="Max-Forwards">Section 9.5</a>). A TRACE request <em class="bcp14">MUST NOT</em> include a message-body. 1099 1099 </p> 1100 1100 <p id="rfc.section.7.8.p.2">TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing … … 1103 1103 infinite loop. 1104 1104 </p> 1105 <p id="rfc.section.7.8.p.3">If the request is valid, the response <em class="bcp14">SHOULD</em> contain the entire request message in the entity-body, with a Content-Type of "message/http" (see <a href="p1-messaging.html#internet.media.type.message.http" title="Internet Media Type message/http">Section 10.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.24"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). Responses to thismethod <em class="bcp14">MUST NOT</em> be cached.1105 <p id="rfc.section.7.8.p.3">If the request is valid, the response <em class="bcp14">SHOULD</em> have a Content-Type of "message/http" (see <a href="p1-messaging.html#internet.media.type.message.http" title="Internet Media Type message/http">Section 10.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.24"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) and contain a message-body that encloses a copy of the entire request message. Responses to the TRACE method <em class="bcp14">MUST NOT</em> be cached. 1106 1106 </p> 1107 1107 <div id="rfc.iref.c.1"></div> … … 1152 1152 <dl> 1153 1153 <dt>GET</dt> 1154 <dd>a n entitycorresponding to the requested resource is sent in the response;</dd>1154 <dd>a representation corresponding to the requested resource is sent in the response;</dd> 1155 1155 <dt>HEAD</dt> 1156 1156 <dd>the entity-header fields corresponding to the requested resource are sent in the response without any message-body;</dd> 1157 1157 <dt>POST</dt> 1158 <dd>a n entitydescribing or containing the result of the action;</dd>1158 <dd>a representation describing or containing the result of the action;</dd> 1159 1159 <dt>TRACE</dt> 1160 <dd>a n entitycontaining the request message as received by the end server.</dd>1160 <dd>a representation containing the request message as received by the end server.</dd> 1161 1161 </dl> 1162 1162 <div id="rfc.iref.28"></div> … … 1169 1169 server <em class="bcp14">MUST</em> create the resource before returning the 201 status code. If the action cannot be carried out immediately, the server <em class="bcp14">SHOULD</em> respond with 202 (Accepted) response instead. 1170 1170 </p> 1171 <p id="rfc.section.8.2.2.p.2">A 201 response <em class="bcp14">MAY</em> contain an ETag response header field indicating the current value of the entity 1171 <p id="rfc.section.8.2.2.p.2">A 201 response <em class="bcp14">MAY</em> contain an ETag response header field indicating the current value of the entity-tag for the representation of the resource 1172 1172 just created (see <a href="p4-conditional.html#header.etag" title="ETag">Section 6.1</a> of <a href="#Part4" id="rfc.xref.Part4.14"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>). 1173 1173 </p> … … 1216 1216 <div id="rfc.iref.s.10"></div> 1217 1217 <h3 id="rfc.section.8.2.7"><a href="#rfc.section.8.2.7">8.2.7</a> <a id="status.206" href="#status.206">206 Partial Content</a></h3> 1218 <p id="rfc.section.8.2.7.p.1">The server has fulfilled the partial GET request for the resource and the enclosed entity is a partial representation as defined1219 in <a href="p5-range.html#status.206" title="206 Partial Content">Section 3.1</a> of <a href="#Part5" id="rfc.xref.Part5.11"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>.1218 <p id="rfc.section.8.2.7.p.1">The server has fulfilled the partial GET request for the resource and the enclosed payload is a partial representation as 1219 defined in <a href="p5-range.html#status.206" title="206 Partial Content">Section 3.1</a> of <a href="#Part5" id="rfc.xref.Part5.11"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. 1220 1220 </p> 1221 1221 <h2 id="rfc.section.8.3"><a href="#rfc.section.8.3">8.3</a> <a id="status.3xx" href="#status.3xx">Redirection 3xx</a></h2> … … 1326 1326 <h2 id="rfc.section.8.4"><a href="#rfc.section.8.4">8.4</a> <a id="status.4xx" href="#status.4xx">Client Error 4xx</a></h2> 1327 1327 <p id="rfc.section.8.4.p.1">The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD 1328 request, the server <em class="bcp14">SHOULD</em> include a n entitycontaining an explanation of the error situation, and whether it is a temporary or permanent condition.1329 These status codes are applicable to any request method. User agents <em class="bcp14">SHOULD</em> display any included entityto the user.1328 request, the server <em class="bcp14">SHOULD</em> include a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. 1329 These status codes are applicable to any request method. User agents <em class="bcp14">SHOULD</em> display any included representation to the user. 1330 1330 </p> 1331 1331 <p id="rfc.section.8.4.p.2">If the client is sending data, a server implementation using TCP <em class="bcp14">SHOULD</em> be careful to ensure that the client acknowledges receipt of the packet(s) containing the response, before the server closes … … 1371 1371 <div id="rfc.iref.s.25"></div> 1372 1372 <h3 id="rfc.section.8.4.7"><a href="#rfc.section.8.4.7">8.4.7</a> <a id="status.406" href="#status.406">406 Not Acceptable</a></h3> 1373 <p id="rfc.section.8.4.7.p.1">The resource identified by the request is only capable of generating response entities which have content characteristics1373 <p id="rfc.section.8.4.7.p.1">The resource identified by the request is only capable of generating response representations which have content characteristics 1374 1374 not acceptable according to the accept headers sent in the request. 1375 1375 </p> … … 1401 1401 <p id="rfc.section.8.4.10.p.1">The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in 1402 1402 situations where it is expected that the user might be able to resolve the conflict and resubmit the request. The response 1403 body <em class="bcp14">SHOULD</em> include enough information for the user to recognize the source of the conflict. Ideally, the response entity would include1404 enough information for the user or user agent to fix the problem; however, that might not be possible and is not required.1403 body <em class="bcp14">SHOULD</em> include enough information for the user to recognize the source of the conflict. Ideally, the response representation would 1404 include enough information for the user or user agent to fix the problem; however, that might not be possible and is not required. 1405 1405 </p> 1406 1406 <p id="rfc.section.8.4.10.p.2">Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation … … 1437 1437 <div id="rfc.iref.s.32"></div> 1438 1438 <h3 id="rfc.section.8.4.14"><a href="#rfc.section.8.4.14">8.4.14</a> <a id="status.413" href="#status.413">413 Request Entity Too Large</a></h3> 1439 <p id="rfc.section.8.4.14.p.1">The server is refusing to process a request because the request entity is larger than the server is willing or able to process.1440 The server <em class="bcp14">MAY</em> close the connection to prevent the client from continuing the request.1439 <p id="rfc.section.8.4.14.p.1">The server is refusing to process a request because the request representation is larger than the server is willing or able 1440 to process. The server <em class="bcp14">MAY</em> close the connection to prevent the client from continuing the request. 1441 1441 </p> 1442 1442 <p id="rfc.section.8.4.14.p.2">If the condition is temporary, the server <em class="bcp14">SHOULD</em> include a Retry-After header field to indicate that it is temporary and after what time the client <em class="bcp14">MAY</em> try again. … … 1470 1470 <h2 id="rfc.section.8.5"><a href="#rfc.section.8.5">8.5</a> <a id="status.5xx" href="#status.5xx">Server Error 5xx</a></h2> 1471 1471 <p id="rfc.section.8.5.p.1">Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has erred or is incapable 1472 of performing the request. Except when responding to a HEAD request, the server <em class="bcp14">SHOULD</em> include a n entitycontaining an explanation of the error situation, and whether it is a temporary or permanent condition.1473 User agents <em class="bcp14">SHOULD</em> display any included entityto the user. These response codes are applicable to any request method.1472 of performing the request. Except when responding to a HEAD request, the server <em class="bcp14">SHOULD</em> include a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. 1473 User agents <em class="bcp14">SHOULD</em> display any included representation to the user. These response codes are applicable to any request method. 1474 1474 </p> 1475 1475 <div id="rfc.iref.60"></div> … … 1515 1515 <p id="rfc.section.8.5.6.p.1">The server does not support, or refuses to support, the protocol version that was used in the request message. The server 1516 1516 is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described 1517 in <a href="p1-messaging.html#http.version" title="HTTP Version">Section 2.5</a> of <a href="#Part1" id="rfc.xref.Part1.27"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, other than with this error message. The response <em class="bcp14">SHOULD</em> contain a n entitydescribing why that version is not supported and what other protocols are supported by that server.1517 in <a href="p1-messaging.html#http.version" title="HTTP Version">Section 2.5</a> of <a href="#Part1" id="rfc.xref.Part1.27"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, other than with this error message. The response <em class="bcp14">SHOULD</em> contain a representation describing why that version is not supported and what other protocols are supported by that server. 1518 1518 </p> 1519 1519 <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a> <a id="header.fields" href="#header.fields">Header Field Definitions</a></h1>
Note: See TracChangeset
for help on using the changeset viewer.