Re: Update: RE: Caching dynamic content

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 06 Nov 2000 02:15:53 +0100

The original poster are correct here. It is the same entity but with
different Content-Encoding. (look again at the headers...)

However, the reply is invalid in that it does not indicate that the
reply was based on the Accept-Encoding header. HTTP/1.1 requires that
servers make use of the Vary header when returing replies that differ
depending on the characteristics of the request. See RFC 2068 section
12.1. Since this reply did not have a Vary header Squid correctly
assumes the URL will always return only one format.

If the reply have a Vary header then Squid will detect it and consider
the reply uncachable since Squid lacks capabilities to support Vary.

--
Henrik Nordström
Squid hacker
Robert Collins wrote:
> 
> I missed a bit. Doh1
> 
> > -----Original Message-----
> > From: Jochen Dolze [mailto:dolze@epcnet.de]
> > Sent: Sunday, 29 October 2000 4:53 AM
> > To: squid-dev@squid-cache.org
> > Subject: Caching dynamic content
> >
> >
> > Hi,
> >
> > we are trying to cache dynamic content with squid-2.3stable. Our own
> > scripting-language is able to produce Last-Modified and ETag-Headers.
> >
> > A reply from the server contains e.g.:
> >
> > Last-Modified: Fri, 18 Aug 2000 13:14:58 GMT
> > ETag: "0-1cca-399d36d2"
> > Content-Length: 8135
> >
> > It works fine with certain different URLs!
> >
> > Are these two contents different for squid, or is squid only
> > taking the URL
> > to identify different pages?:
> >
> > http://web.test.com/file.html?var=1
> >
> > Last-Modified: Fri, 18 Aug 2000 13:14:58 GMT
> > Content-Encoding: gzip
> > ETag: "0-2345-34232425"
> > Content-Length: 3112
> >
> > http://web.test.com/file.html?var=1
> >
> > Last-Modified: Fri, 18 Aug 2000 13:14:58 GMT
> > ETag: "0-2345-34232425"
> > Content-Length: 7135
> >
> > In my case, MSIE5.5 got with squid the wrong cached object!!!
> > Must i use
> > different ETags for compressed/uncompressed content?
> 
> In the two above URL's you have the same URL
> :http://web.test.com/file.html?var=1
> The same Last-Modified
> :Last-Modified: Fri, 18 Aug 2000 13:14:58 GMT
> and the same ETag
> :ETag: "0-2345-34232425"
> and the content-length is DIFFERENT.
> 
> I believe you are breaking rfc 2616 with this behaviour
> 
> === From RFC 2616 Section 3.11
>    An entity tag MUST be unique across all versions of all entities
>    associated with a particular resource. A given entity tag value MAY
>    be used for entities obtained by requests on different URIs. The use
>    of the same entity tag value in conjunction with entities obtained by
>    requests on different URIs does not imply the equivalence of those
>    entities.
> ===
> You are serving different versions of the entity
> http://web.test.com/file.html?var=1 with the same Etag. That violates
> the MUST quoted above.
> 
> There is a similar constraint with Last-Modified.
> 
> If your URI was different it would not be an issue.
> 
> Rob
> <snip>
Received on Sun Nov 05 2000 - 18:15:47 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:55 MST