Connected: An Internet Encyclopedia
RFC 1945 - 10.4 Content-Length

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1945
Up: 10. Header Field Definitions
Prev: 10.3 Content-Encoding
Next: 10.5 Content-Type

### 10.4 Content-Length

The Content-Length entity-header field indicates the size of the Entity-Body, in decimal number of octets, sent to the recipient or, in the case of the HEAD method, the size of the Entity-Body that would have been sent had the request been a GET.

           Content-Length = "Content-Length" ":" 1*DIGIT

An example is

           Content-Length: 3495

Applications should use this field to indicate the size of the Entity-Body to be transferred, regardless of the media type of the entity. A valid Content-Length field value is required on all HTTP/1.0 request messages containing an entity body.

Any Content-Length greater than or equal to zero is a valid value. Section 7.2.2 describes how to determine the length of a response entity body if a Content-Length is not given.

Note: The meaning of this field is significantly different from the corresponding definition in MIME, where it is an optional field used within the "message/external-body" content-type. In HTTP, it should be used whenever the entity's length can be determined prior to being transferred.

Next: 10.5 Content-Type

Connected: An Internet Encyclopedia
RFC 1945 - 10.4 Content-Length