Re: HTTP Content-length question...

On Sun, 7 May 1995, Srivatsa Srinivasan wrote:

> The problem I am facing is, this header is returned for most kind of objects
> (image/gif, audio/au etc) but not for text/html. Is there any special form
> of the GET request that will force the server to return the size of the object
> (the 'Content-length:' header) irrespective of its MIME type ?

The most recent HTTP 1.0 draft I could find states:

   Although it is not required, applications are strongly encouraged to
   use this field to indicate the size of the Entity-Body to be
   transferred, regardless of the media type of the entity.

The first five words here are the important ones... the server doesn't 
have to include Content-Length, and sometimes it doesn't. It's certainly 
nice, but you can't assume that this header will exist when writing an 
HTTP client. Because it won't always. But it is odd that your server 
returns the header for images, but not text... sounds like a bug.

--
Alexei Kosut          Live, Londo and Prosper: /\/\/\\____-_____--  __.__..
akosut@nueva.pvt.k12.ca.us             |-|-----|:|:|:: ..| |...|  ||=/  \
Lefler on IRC                          |-|-----======____| |---|  |-=\__/
<URL:http://www.nueva.pvt.k12.ca.us/~akosut/>  \/\/\/     -     --

Received on Sunday, 7 May 1995 17:20:54 UTC