From: wessels <> Date: Sun, 24 Nov 1996 09:41:56 +0000 (+0000) Subject: Ed Knowles aka Jasper X-Git-Tag: SQUID_3_0_PRE1~5425 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c17643286d8bec03c7a695be7eb8be876e72f6bf;p=thirdparty%2Fsquid.git Ed Knowles aka Jasper 1) Added a missing #include 2) Added the 'other' cache-control's to cachemgr.cgi stats. If anyone actually starts to send them out, then worry about using the EBIT_SET() stuff, though some of them should be straight forward to add in. 3) Minor tidy to squid.conf.pre.in --- diff --git a/lib/util.c b/lib/util.c index 953a13363d..c7367eab2a 100644 --- a/lib/util.c +++ b/lib/util.c @@ -1,5 +1,5 @@ /* - * $Id: util.c,v 1.27 1996/11/22 05:05:23 wessels Exp $ + * $Id: util.c,v 1.28 1996/11/24 02:41:56 wessels Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -473,11 +473,12 @@ tvSubMsec(struct timeval t1, struct timeval t2) char * xstrncpy(char *dst, const char *src, size_t n) { - if (n != 0) { - if (src != NULL) - while (--n != 0 && *src != '\0') - *dst++ = *src++; - *dst = '\0'; - } + if (n == 0) + return dst; + if (src == NULL) + return dst; + while (--n != 0 && *src != '\0') + *dst++ = *src++; + *dst = '\0'; return dst; } diff --git a/lib/uudecode.c b/lib/uudecode.c index fbc342c147..b2a24d04ff 100644 --- a/lib/uudecode.c +++ b/lib/uudecode.c @@ -1,4 +1,4 @@ - +#include "config.h" #include "ansiproto.h" #include "util.h" diff --git a/src/http.cc b/src/http.cc index 6740433121..3e1fcd32ed 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,5 +1,5 @@ /* - * $Id: http.cc,v 1.112 1996/11/24 02:37:35 wessels Exp $ + * $Id: http.cc,v 1.113 1996/11/24 02:42:03 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -309,6 +309,18 @@ httpParseReplyHeaders(const char *buf, struct _http_reply *reply) } else if (!strncasecmp(t, "no-cache", 8)) { EBIT_SET(reply->cache_control, SCC_NOCACHE); ReplyHeaderStats.cc[SCC_NOCACHE]++; + } else if (!strncasecmp(t, "no-store", 8)) { + EBIT_SET(reply->cache_control, SCC_NOSTORE); + ReplyHeaderStats.cc[SCC_NOSTORE]++; + } else if (!strncasecmp(t, "no-transform", 12)) { + EBIT_SET(reply->cache_control, SCC_NOTRANSFORM); + ReplyHeaderStats.cc[SCC_NOTRANSFORM]++; + } else if (!strncasecmp(t, "must-revalidate", 15)) { + EBIT_SET(reply->cache_control, SCC_MUSTREVALIDATE); + ReplyHeaderStats.cc[SCC_MUSTREVALIDATE]++; + } else if (!strncasecmp(t, "proxy-revalidate", 16)) { + EBIT_SET(reply->cache_control, SCC_PROXYREVALIDATE); + ReplyHeaderStats.cc[SCC_PROXYREVALIDATE]++; } else if (!strncasecmp(t, "max-age", 7)) { if ((t = strchr(t, '='))) { delta = atoi(++t);