Connected: An Internet Encyclopedia
7.2.2 Length

Up: 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

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.


Next: 8. Method Definitions

Connected: An Internet Encyclopedia
7.2.2 Length