Connected: An Internet Encyclopedia
RFC 1945 - 7.2.2 Length

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1945
Up: 7. Entity
Up: 7.2 Entity Body
Prev: 7.2.1 Type
Next: 8. Method Definitions

### 7.2.2 Length

When an Entity-Body is included with a message, the length of that body may be determined in one of two ways. If a Content-Length header field is present, its value in bytes represents the length of the Entity-Body. Otherwise, the body length is determined by the closing of the connection by the server.

Closing the connection cannot be used to indicate the end of a request body, since it leaves no possibility for the server to send back a response. Therefore, HTTP/1.0 requests containing an entity body must include a valid Content-Length header field. If a request contains an entity body and Content-Length is not specified, and the server does not recognize or cannot calculate the length from other fields, then the server should send a 400 (bad request) response.

Note: Some older servers supply an invalid Content-Length when sending a document that contains server-side includes dynamically inserted into the data stream. It must be emphasized that this will not be tolerated by future versions of HTTP. Unless the client knows that it is receiving a response from a compliant server, it should not depend on the Content-Length value being correct.

Next: 8. Method Definitions

Connected: An Internet Encyclopedia
RFC 1945 - 7.2.2 Length