Re: [squid-users] from 2.5.STABLE4 on, read_timout sets the object age in case of i gnoring no-cache???

From: Henrik Nordstrom <[email protected]>
Date: Thu, 8 Apr 2004 19:40:21 +0200 (CEST)

On Thu, 8 Apr 2004 Thorsten.Grote@lycos-europe.com wrote:

> When the patch is applied against 2.5.STABLE3, everything works as aspected.
> When using this patch in 2.5.STABLE4/5, the age of each object is covered by
> the time set for "read_timout". E.g. If read_timout is 5 seconds, the object
> will be considered fresh for 5 seconds and than expire... kind of strange
> for me.

Sounds strange indeed. And I don't have any suggestion what may be the
cause.. unless ofcourse if your build tree is not clean and containing a
mix of objects built with the original and patched sources.. try "make
clean; make install" just in case.

From what I can see in your patch is should work.

I do however have some small comments.

>
> + ignore-no-cache ignores any ``Pragma: no-cache'' header
> + received from a server. The HTTP RFC never allows the
> + use of this header from a server, only a client, though
> + plenty of servers send it anyway.

Sounds good, but:

> - if (EBIT_TEST(cc_mask, CC_NO_CACHE))
> - return 0;
> + if (EBIT_TEST(cc_mask, CC_NO_CACHE)) {
> + const refresh_t *R = refreshLimits(httpState->entry->mem_obj->url);
> + if (R && !R->flags.ignore_no_cache) return 0;
> + }

This is the "Cache-Control: no-cache" header which is fully defined for
reply headers. It is only the older "Pragma: no-cache" which is not
defined for reply headers (only request headers)

> @@ -241,8 +243,10 @@
> String s = httpHeaderGetList(hdr, HDR_PRAGMA);
> const int no_cache = strListIsMember(&s, "no-cache", ',');
> stringClean(&s);
> - if (no_cache)
> - return 0;
> + if (no_cache) {
> + const refresh_t *R =
> refreshLimits(httpState->entry->mem_obj->url);
> + if (R && !R->flags.ignore_no_cache) return 0;
> + }

This is ok, and not even a HTTP violation as Pragma: no-cache is not
defined for response headers..

Regards
Henrik
Received on Thu Apr 08 2004 - 11:40:23 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Apr 30 2004 - 12:00:02 MDT