Connected: An Internet Encyclopedia
14.14 Content-Length

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 2068
Up: 14 Header Field Definitions
Prev: 14.13 Content-Language
Next: 14.15 Content-Location

14.14 Content-Length

14.14 Content-Length

The Content-Length entity-header field indicates the size of the message-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 message-body to be transferred, regardless of the media type of the entity. It must be possible for the recipient to reliably determine the end of HTTP/1.1 requests containing an entity-body, e.g., because the request has a valid Content-Length field, uses Transfer-Encoding: chunked or a multipart body.

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


Next: 14.15 Content-Location

Connected: An Internet Encyclopedia
14.14 Content-Length