On Monday 23 June 2003 18.07, David Nicklay wrote:
> to cache. In the process of debugging we found that this header
> causes problems for squid:
> Cache-Control: no-cache="set-cookie,set-cookie2"
This looks like a reply-header, not a response header.
There is no squid.conf tweaks to override reply no-cache headers
(Pragma: no-cache, Cache-Control: no-cache[=*], Cache-Control:
max-age=.. etc)
> Squid will not cache this request even with ignore-reload enabled.
Correct. If this is a reply header as it's content suggests then
ignore-reload is not relevant as ignore-reload is a request modifier,
not a reply modifier.
> The anonymizer doesn't seem to do what I want as the decision to
> cache the request is made before then in the process?
Correct. header_access is applied on forwarded requests/responses
(including cache hits).
> With a quick and dirty hack, I was able to make squid drop
> the header and it subsequently was able to cache the request.
Are you sure this is what you want?
> My question is: Is there a facility in squid to do this already (I
> could not find one), which will drop the header before the squid
> cache decision making process is made? If not would anyone care if
> I made and submitted a patch to do this?
There is currently no good mechanism for doing this in Squid.
Patches which adds a few cache-control response header overrides for
accelerator mode in Squid-3 is welcome.
> Here is my quick and dirty hack:
> in httpHeaderEntryParseCreate of HttpHeader.c
>
> ....
> /* set field name */
> if (id == HDR_OTHER)
> stringLimitInit(&e->name, field_start, name_len);
> else if ( id == HDR_CACHE_CONTROL) {
> debug(55,2) ("NOTICE: Dropping cache control header\n");
> memFree(e, MEM_HTTP_HDR_ENTRY);
> return NULL;
This is obviously not acceptable in the Squid code, not even for
accelerator use.. Cache-Control is a very important aspect of
HTTP/1.1, and should not be blindly ignored.
Regards
Henrik
Received on Mon Jun 23 2003 - 13:06:51 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:09 MST