Network Working Group R. Fielding Request for Comments: 2616 ...
Network Working Group R. Fielding Request for Comments: 2616 ...
Network Working Group R. Fielding Request for Comments: 2616 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
message-body = entity-body| Transfer-Encoding MUST be used to indicate any transfer-codingsapplied by an application to ensure safe and proper transfer of themessage. Transfer-Encoding is a property of the message, not of the<strong>Fielding</strong>, et al. Standards Track [Page 32]RFC <strong>2616</strong> HTTP/1.1 June 1999entity, and thus MAY be added or removed by any application along therequest/response chain. (However, section 3.6 places restrictions onwhen certain transfer-codings may be used.)The rules <strong>for</strong> when a message-body is allowed in a message differ <strong>for</strong>requests and responses.The presence of a message-body in a request is signaled by theinclusion of a Content-Length or Transfer-Encoding header field inthe request's message-headers. A message-body MUST NOT be included ina request if the specification of the request method (section 5.1.1)does not allow sending an entity-body in requests. A server SHOULDread and <strong>for</strong>ward a message-body on any request; if the request methoddoes not include defined semantics <strong>for</strong> an entity-body, then themessage-body SHOULD be ignored when handling the request.For response messages, whether or not a message-body is included witha message is dependent on both the request method and the responsestatus code (section 6.1.1). All responses to the HEAD request methodMUST NOT include a message-body, even though the presence of entityheaderfields might lead one to believe they do. All 1xx(in<strong>for</strong>mational), 204 (no content), and 304 (not modified) responsesMUST NOT include a message-body. All other responses do include amessage-body, although it MAY be of zero length.4.4 Message LengthThe transfer-length of a message is the length of the message-body asit appears in the message; that is, after any transfer-codings havebeen applied. When a message-body is included with a message, thetransfer-length of that body is determined by one of the following(in order of precedence):1.Any response message which "MUST NOT" include a message-body (suchas the 1xx, 204, and 304 responses and any response to a HEADrequest) is always terminated by the first empty line after theheader fields, regardless of the entity-header fields present in