Re: ftp service

From: Duane Wessels <wessels@dont-contact.us>
Date: Fri, 20 Dec 96 13:42:25 -0800

grumbler@esoterica.pt writes:

> Also if youre using squid-1.1.* dont forget to set a refresh_pattern or
>all ftp stuff will always expire as soon as they get cached (took me a day
>to figure that out :-).. yeah, i know, RTFM :-))...

Oops, this was not intended. The problem here is that for non-HTTP
objects, the 'lastmod' time is the same as the 'lastvalid' time so we
can't calculate the Last-Modified-Factor. So I think the patch below
is needed.

Note that sometimes we can get real last-modified times for FTP objects
if the FTP server supports the MDTM command.

diff -u -w -r1.10 refresh.c
--- refresh.c 1996/11/26 16:59:40 1.10
+++ refresh.c 1996/12/20 21:38:55
@@ -164,6 +164,10 @@
        return 1;
     }
     if (entry->timestamp <= entry->lastmod) {
+ if (request->protocol != PROTO_HTTP) {
+ debug(22, 3, "refreshCheck: NO: non-HTTP request\n");
+ return 0;
+ }
        debug(22, 3, "refreshCheck: YES: lastvalid <= lastmod\n");
        return 1;
     }

Duane W.
Received on Fri Dec 20 1996 - 13:50:05 MST

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