W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > April to June 2007

Re: The getcontentlength property

From: Julian Reschke <julian.reschke@gmx.de>
Date: Fri, 22 Jun 2007 15:03:48 +0200
Message-ID: <467BC8B4.1050605@gmx.de>
To: werner.donne@re.be
CC: w3c-dist-auth@w3.org

Werner Donné wrote:
> Hi,
> RFC 2518 says that this property must be returned if the
> Content-Length header is returned in a GET response for
> the resource at hand. I assume that it is allowed to return
> this property if the Content-Length header is never returned,
> for example, because the chunked transfer encoding is used.


> Can a client rely on a previously retrieved getcontentlength
> to read only part of the chunked response stream of the
> following GET response?

If it has reason to believe that the entity didn't change (ETag...), 
then yes.

> The particular case I have is where I detect the client is on
> a windows machine and is retrieving a text/plain resource. In
> that case carriage returns may be added on the fly. This
> increases the physical length of the resource.

By doing this you're serving two different variants, depending on some 
part of the request ("User-Agent" header?)? So you'll have to specify 
"Vary" header in the response, and assign different entity tags. In that 
case a properly written client shouldn't have any problems because it 
can detect that the entity served by the second request is really different.

Best regards, Julian
Received on Friday, 22 June 2007 13:04:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:41 UTC