W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > September to December 1997

RE: What is Content-Length?

From: Paul Leach <paulle@microsoft.com>
Date: Thu, 11 Dec 1997 20:33:51 -0800
Message-Id: <5CEA8663F24DD111A96100805FFE6587203847@red-msg-51.dns.microsoft.com>
To: Jeffrey Mogul <mogul@pa.dec.com>, 'John Franks' <john@math.nwu.edu>
Cc: http-wg%cuckoo.hpl.hp.com@hplb.hpl.hp.com
X-Mailing-List: <http-wg@cuckoo.hpl.hp.com> archive/latest/4945
An alternate proposal, which I believe is simpler and requires less

Content-Length, if validly present, is the length of the entity-body (which
is the message-body after transfer codings are removed). It is also the
length of the message-body if no transfer-coding is used.
Content-Length MUST NOT be present if a transfer coding is used. If it is
present in such cases, it is invalid, and the robustness principle says it
should be ignored.

If we want, we can provide for the future existence of non-self-delimited
transfer codings by adding Transfer-length:

Transfer-Length, if validly present, is the length of the message-body.
Transfer-Length MUST NOT be present on self-delimiting transfer codings. If
it is present in this case, it is invalid, and the robustness principle says
it should be ignored.

Under these rules, Content-Length is still logically end-to-end -- the
header may not physically be present, but its value if it is ever present is
well-defined end-to-end and the same end-to-end.

Note that the definition of Content-length is independent of the existence
of Transfer-length, and we could omit it.

Under these rules, proxies may delete Content-length, as long as the add
Transfer-length or a self-delimited transfer coding. So, we remove it from
the list of "must not modify" headers.

Digest Auth should drop all reference to Content-Length and replaces it with
"length of entity-body", which is always well-defined and always
determinable given the above rules.

Received on Saturday, 13 December 1997 12:01:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:40:21 UTC