Changeset 2091 for draft-ietf-httpbis/latest
- Timestamp:
- 06/01/13 07:26:25 (10 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p2-semantics.html
r2090 r2091 1144 1144 </pre><div id="rfc.iref.p.1"></div> 1145 1145 <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a id="payload" href="#payload">Payload Semantics</a></h2> 1146 <p id="rfc.section.3.3.p.1">Some HTTP messages transfer a complete or partial representation as the message "<dfn>payload</dfn>". In some cases, a payload might only containthe associated representation's header fields (e.g., responses to HEAD) or1146 <p id="rfc.section.3.3.p.1">Some HTTP messages transfer a complete or partial representation as the message "<dfn>payload</dfn>". In some cases, a payload might contain only the associated representation's header fields (e.g., responses to HEAD) or 1147 1147 only some part(s) of the representation data (e.g., the <a href="p5-range.html#status.206" class="smpl">206 (Partial Content)</a> status code). 1148 1148 </p> 1149 <p id="rfc.section.3.3.p.2">The purpose of a payload in a request is defined by the method semantics. In a response, the payload's purpose is defined 1150 by both the request method and the response status code. 1151 </p> 1152 <p id="rfc.section.3.3.p.3">For example, a representation in the payload of a PUT request (<a href="#PUT" id="rfc.xref.PUT.1" title="PUT">Section 4.3.4</a>) represents the desired state of the <a href="#resources" class="smpl">target resource</a> if the request is successfully applied, whereas a representation in the payload of a POST request (<a href="#POST" id="rfc.xref.POST.1" title="POST">Section 4.3.3</a>) represents an anonymous resource for providing data to be processed, such as the information that a user entered within 1149 <p id="rfc.section.3.3.p.2">The purpose of a payload in a request is defined by the method semantics. For example, a representation in the payload of 1150 a PUT request (<a href="#PUT" id="rfc.xref.PUT.1" title="PUT">Section 4.3.4</a>) represents the desired state of the <a href="#resources" class="smpl">target resource</a> if the request is successfully applied, whereas a representation in the payload of a POST request (<a href="#POST" id="rfc.xref.POST.1" title="POST">Section 4.3.3</a>) represents an anonymous resource for providing data to be processed, such as the information that a user entered within 1153 1151 an HTML form. 1154 1152 </p> 1155 <p id="rfc.section.3.3.p.4">Likewise, the payload of a <a href="#status.200" class="smpl">200 (OK)</a> response to GET (<a href="#GET" id="rfc.xref.GET.1" title="GET">Section 4.3.1</a>) ought to contain a representation of the <a href="#resources" class="smpl">target resource</a>, as observed at the time of the message origination date (<a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section 7.1.1.2</a>), whereas the same status code in a response to POST might contain either a representation of the processing result or a 1156 current representation of the target resource after applying the processing. Response messages with an error status code usually 1157 contain a representation of the error condition, such that it describes the error state and what next steps are suggested 1158 for resolving it. 1159 </p> 1160 <p id="rfc.section.3.3.p.5">Header fields that specifically describe the payload, rather than the associated representation, are referred to as "payload 1153 <p id="rfc.section.3.3.p.3">In a response, the payload's purpose is defined by both the request method and the response status code. For example, the 1154 payload of a <a href="#status.200" class="smpl">200 (OK)</a> response to GET (<a href="#GET" id="rfc.xref.GET.1" title="GET">Section 4.3.1</a>) represents the current state of the <a href="#resources" class="smpl">target resource</a>, as observed at the time of the message origination date (<a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section 7.1.1.2</a>), whereas the payload of the same status code in a response to POST might represent either the processing result or the new 1155 state of the target resource after applying the processing. Response messages with an error status code usually contain a 1156 payload that represents the error condition, such that it describes the error state and what next steps are suggested for 1157 resolving it. 1158 </p> 1159 <p id="rfc.section.3.3.p.4">Header fields that specifically describe the payload, rather than the associated representation, are referred to as "payload 1161 1160 header fields". Payload header fields are defined in other parts of this specification, due to their impact on message parsing. 1162 1161 </p> … … 1288 1287 <tr> 1289 1288 <td class="left">HEAD</td> 1290 <td class="left">Same as GET, but do not include a message body in the response.</td>1289 <td class="left">Same as GET, but only transfer the status line and header block.</td> 1291 1290 <td class="left"><a href="#HEAD" id="rfc.xref.HEAD.1" title="HEAD">4.3.2</a></td> 1292 1291 </tr> … … 1407 1406 <h3 id="rfc.section.4.3.2"><a href="#rfc.section.4.3.2">4.3.2</a> <a id="HEAD" href="#HEAD">HEAD</a></h3> 1408 1407 <div id="rfc.iref.h.1"></div> 1409 <p id="rfc.section.4.3.2.p.1">The HEAD method is identical to GET except that the server <em class="bcp14">MUST NOT</em> send a message body in the response. The metadata contained in the HTTP header fields in response to a HEAD request <em class="bcp14">SHOULD</em> be identical to the information sent in response to a GET request. This method can be used for obtaining metadata about the 1408 <p id="rfc.section.4.3.2.p.1">The HEAD method is identical to GET except that the server <em class="bcp14">MUST NOT</em> send a message body in the response (i.e., the response terminates at the end of the header block). The metadata contained 1409 in the HTTP header fields in response to a HEAD request <em class="bcp14">SHOULD</em> be identical to the information sent in response to a GET request. This method can be used for obtaining metadata about the 1410 1410 selected representation without transferring the representation data. This method is often used for testing hypertext links 1411 1411 for validity, accessibility, and recent modification. -
draft-ietf-httpbis/latest/p2-semantics.xml
r2090 r2091 848 848 <t> 849 849 Some HTTP messages transfer a complete or partial representation as the 850 message "<x:dfn>payload</x:dfn>". In some cases, a payload might only851 containthe associated representation's header fields (e.g., responses to850 message "<x:dfn>payload</x:dfn>". In some cases, a payload might contain 851 only the associated representation's header fields (e.g., responses to 852 852 HEAD) or only some part(s) of the representation data 853 853 (e.g., the <x:ref>206 (Partial Content)</x:ref> status code). … … 855 855 <t> 856 856 The purpose of a payload in a request is defined by the method semantics. 857 In a response, the payload's purpose is defined by both the request method858 and the response status code.859 </t>860 <t>861 857 For example, a representation in the payload of a PUT request 862 858 (<xref target="PUT"/>) represents the desired state of the <x:ref>target resource</x:ref> … … 867 863 </t> 868 864 <t> 869 Likewise, the payload of a <x:ref>200 (OK)</x:ref> response to GET 870 (<xref target="GET"/>) ought to contain a representation of the 865 In a response, the payload's purpose is defined by both the request method 866 and the response status code. 867 For example, the payload of a <x:ref>200 (OK)</x:ref> response to GET 868 (<xref target="GET"/>) represents the current state of the 871 869 <x:ref>target resource</x:ref>, as observed at the time of the message 872 origination date (<xref target="header.date"/>), whereas the same status 873 code in a response to POST might contain either a representation of the 874 processing result or a current representation of the target resource after 875 applying the processing. Response messages with an error status code 876 usually contain a representation of the error condition, such that it 877 describes the error state and what next steps are suggested for resolving 878 it. 870 origination date (<xref target="header.date"/>), whereas the payload of 871 the same status code in a response to POST might represent either the 872 processing result or the new state of the target resource after applying 873 the processing. Response messages with an error status code usually contain 874 a payload that represents the error condition, such that it describes the 875 error state and what next steps are suggested for resolving it. 879 876 </t> 880 877 <t> … … 1079 1076 <c><xref target="GET" format="counter"/></c> 1080 1077 <c>HEAD</c> 1081 <c>Same as GET, but do not include a message body in the response.</c>1078 <c>Same as GET, but only transfer the status line and header block.</c> 1082 1079 <c><xref target="HEAD" format="counter"/></c> 1083 1080 <c>POST</c> … … 1286 1283 <t> 1287 1284 The HEAD method is identical to GET except that the server &MUST-NOT; 1288 send a message body in the response . The metadata contained1289 in the HTTP header fields in response to a HEAD request &SHOULD; be identical1290 to the information sent in response to a GET request. This method can1291 be used for obtaining metadata about the selected representation1292 without transferring the representation data. This method is1293 often used for testing hypertext links for validity, accessibility,1294 and recent modification.1285 send a message body in the response (i.e., the response terminates at the 1286 end of the header block). The metadata contained in the HTTP header fields 1287 in response to a HEAD request &SHOULD; be identical to the information sent 1288 in response to a GET request. This method can be used for obtaining 1289 metadata about the selected representation without transferring the 1290 representation data. This method is often used for testing hypertext links 1291 for validity, accessibility, and recent modification. 1295 1292 </t> 1296 1293 <t>
Note: See TracChangeset
for help on using the changeset viewer.