Re: Netscape 4 ?

From: Robert Andersson <robert@dont-contact.us>
Date: 30 Jul 1997 17:42:36 +0200

In <199707291709.KAA10784@nlanr.net> wessels@nlanr.net (Duane Wessels) writes:

>Try this patch included below, and add this to your squid.conf:
> reload_into_ims on
>This patch is designed to have the following effects
> * if the request includes both 'no-cache' and 'If-Modified-Since'
> the 'no-cache' is simply ignored
> * if the request includes only 'no-cache' then Squid
> makes an 'If-Modified-Since' request out the other side.

Thanks, that mostly did the job. However I think there is a bug in the
handling of the 'request includes both no-cache and If-Modified-Since' case.
This should not blindly be turned into an IMS request without first
checking the refresh_patterns for staleness. The Netscape simple reload
problem reported by Christian Balzer is a side-effect of this I think.
I've applied the patch below on top of yours with good results.

*** dist/icp.c.duane Wed Jul 30 16:04:58 1997
--- icp.c Wed Jul 30 16:48:09 1997
***************
*** 808,820 ****
          icpState->log_type = LOG_TCP_MISS;
          storeRelease(entry);
          entry = NULL;
- } else if (BIT_TEST(request->flags, REQ_NOCACHE_SPECIAL)) {
- if (BIT_TEST(request->flags, REQ_IMS))
- icpState->log_type = LOG_TCP_IMS_MISS;
- else if (request->protocol == PROTO_HTTP)
- icpState->log_type = LOG_TCP_REFRESH_MISS;
- else
- icpState->log_type = LOG_TCP_MISS; /* XXX zoinks */
      } else if (BIT_TEST(request->flags, REQ_NOCACHE)) {
          /* NOCACHE should always eject a negative cached object */
          if (BIT_TEST(entry->flag, ENTRY_NEGCACHED))
--- 808,813 ----
***************
*** 841,846 ****
--- 834,844 ----
      } else if (BIT_TEST(request->flags, REQ_IMS)) {
          /* User-initiated IMS request for something we think is valid */
          icpState->log_type = LOG_TCP_IMS_MISS;
+ } else if (BIT_TEST(request->flags, REQ_NOCACHE_SPECIAL)) {
+ if (request->protocol == PROTO_HTTP)
+ icpState->log_type = LOG_TCP_REFRESH_MISS;
+ else
+ icpState->log_type = LOG_TCP_MISS; /* XXX zoinks */
      } else {
          icpState->log_type = LOG_TCP_HIT;
      }

Regards, Robert

-- 
Robert Andersson   Voice +47 22418551   Gallagher & Robertson A/S
robert@gar.no      Fax   +47 22428922   Kongensgt. 23, 0153 Oslo, Norway
Received on Wed Jul 30 1997 - 09:05:53 MDT

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