W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1996

Re: [Q] Content length in MIME headers always right?

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Wed, 26 Jun 1996 16:44:48 -0400
Message-Id: <199606262044.QAA27794@www20.w3.org>
To: sacha@clip.dia.fi.upm.es (Sacha)
Cc: www-lib@w3.org
Sacha writes:

> I have a question regarding content length. Sometimes when
> I just fetch the header of a document I get a content length
> of -1 (i.e. unset), but if I get the entire document I get
> the correct content length. Can it be that the server creates
> different headers depending on whether you also ask for the
> document? Does this mean that the only way to get the content
> length with absolute certainty is to request the whole document?
> Could it be that this -1 has something to do with access
> restrictions?

Hi Sacha,

Do you have any examples of this? I could imagine that some servers may not 
send the content length on a HEAD request if the output is produced 
dynamically (for example a script or a server side include). However, the 
HTTP spec states explicitly that it is not allowed to distinguish the two 
situations - there must always be a valid content length (or some other 
means of determining the size of the response).

Henrik Frystyk Nielsen, <frystyk@w3.org>
World Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA
Received on Wednesday, 26 June 1996 16:44:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:47 UTC