/*
- * $Id: acl.cc,v 1.63 1996/11/15 00:36:12 wessels Exp $
+ * $Id: acl.cc,v 1.64 1996/11/15 07:51:04 wessels Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
static struct _acl *AclList = NULL;
static struct _acl **AclListTail = &AclList;
+static const char *const w_space = " \t\n\r"; /* Jasper sez so */
static void aclDestroyAclList _PARAMS((struct _acl_list * list));
static void aclDestroyIpList _PARAMS((struct _acl_ip_data * data));
/*
- * $Id: cache_cf.cc,v 1.138 1996/11/15 00:36:14 wessels Exp $
+ * $Id: cache_cf.cc,v 1.139 1996/11/15 07:51:05 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
const char *cfg_filename = NULL; /* just the last part */
char ForwardedBy[256] = "";
-const char *const w_space = " \t\n";
-const char *const list_sep = ", \t\n";
+static const char *const w_space = " \t\n\r";
+static const char *const list_sep = ", \t\n\r";
char config_input_line[BUFSIZ];
int config_lineno = 0;
/*
- * $Id: cachemgr.cc,v 1.44 1996/11/15 00:36:15 wessels Exp $
+ * $Id: cachemgr.cc,v 1.45 1996/11/15 07:51:06 wessels Exp $
*
* DEBUG: Section 0 CGI Cache Manager
* AUTHOR: Harvest Derived
static int hasTables = FALSE;
static const char *script_name = "/cgi-bin/cachemgr.cgi";
-static const char *const w_space = " \t\n";
+static const char *const w_space = " \t\n\r";
static const char *progname = NULL;
static time_t now;
/*
- * $Id: debug.cc,v 1.37 1996/11/15 00:36:16 wessels Exp $
+ * $Id: debug.cc,v 1.38 1996/11/15 07:51:07 wessels Exp $
*
* DEBUG: section 0 Debug Routines
* AUTHOR: Harvest Derived
FILE *debug_log = NULL;
static char *debug_log_file = NULL;
+static const char *const w_space = " \t\n\r";
#define MAX_DEBUG_SECTIONS 100
static int debugLevels[MAX_DEBUG_SECTIONS];
/*
- * $Id: fqdncache.cc,v 1.35 1996/11/15 00:36:17 wessels Exp $
+ * $Id: fqdncache.cc,v 1.36 1996/11/15 07:51:07 wessels Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
static long fqdncache_low = 180;
static long fqdncache_high = 200;
+static const char *const w_space = " \t\n\r";
static void
fqdncacheEnqueue(fqdncache_entry * f)
/*
- * $Id: ftp.cc,v 1.82 1996/11/14 19:02:16 wessels Exp $
+ * $Id: ftp.cc,v 1.83 1996/11/15 07:51:08 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
static int ftpget_server_read = -1;
static int ftpget_server_write = -1;
static u_short ftpget_port = 0;
+static const char *const w_space = " \t\n\r";
typedef struct _Ftpdata {
StoreEntry *entry;
/*
- * $Id: http.cc,v 1.107 1996/11/15 00:36:19 wessels Exp $
+ * $Id: http.cc,v 1.108 1996/11/15 07:51:09 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
#define HTTP_DELETE_GAP (1<<18)
+static const char *const w_space = " \t\n\r";
+
typedef enum {
SCC_PUBLIC,
SCC_PRIVATE,
ReplyHeaderStats.lm++;
}
} else if (!strncasecmp(t, "Cache-Control:", 14)) {
- if ((t = strtok(NULL, w_space))) {
- if (!strncasecmp(t, "public", 6)) {
- EBIT_SET(reply->cache_control, SCC_PUBLIC);
- ReplyHeaderStats.cc[SCC_PUBLIC]++;
- } else if (!strncasecmp(t, "private", 7)) {
- EBIT_SET(reply->cache_control, SCC_PRIVATE);
- ReplyHeaderStats.cc[SCC_PRIVATE]++;
- } else if (!strncasecmp(t, "no-cache", 8)) {
- EBIT_SET(reply->cache_control, SCC_NOCACHE);
- ReplyHeaderStats.cc[SCC_NOCACHE]++;
- } else if (!strncasecmp(t, "max-age", 7)) {
- if ((t = strchr(t, '='))) {
- delta = atoi(++t);
- EBIT_SET(reply->cache_control, SCC_MAXAGE);
- ReplyHeaderStats.cc[SCC_MAXAGE]++;
- strcpy(reply->expires, mkrfc1123(squid_curtime + delta));
- }
+ t += 14;
+ while (*t == ' ' || *t == '\t')
+ t++;
+ if (!strncasecmp(t, "public", 6)) {
+ EBIT_SET(reply->cache_control, SCC_PUBLIC);
+ ReplyHeaderStats.cc[SCC_PUBLIC]++;
+ } else if (!strncasecmp(t, "private", 7)) {
+ EBIT_SET(reply->cache_control, SCC_PRIVATE);
+ ReplyHeaderStats.cc[SCC_PRIVATE]++;
+ } else if (!strncasecmp(t, "no-cache", 8)) {
+ EBIT_SET(reply->cache_control, SCC_NOCACHE);
+ ReplyHeaderStats.cc[SCC_NOCACHE]++;
+ } else if (!strncasecmp(t, "max-age", 7)) {
+ if ((t = strchr(t, '='))) {
+ delta = atoi(++t);
+ EBIT_SET(reply->cache_control, SCC_MAXAGE);
+ ReplyHeaderStats.cc[SCC_MAXAGE]++;
+ strcpy(reply->expires, mkrfc1123(squid_curtime + delta));
}
}
}
ReplyHeaderStats.ctype);
storeAppendPrintf(entry, "{ Content-Length: %d}\n",
ReplyHeaderStats.clen);
- for (i = 0; i < SCC_ENUM_END; i++)
+ for (i = SCC_PUBLIC; i < SCC_ENUM_END; i++)
storeAppendPrintf(entry, "{Cache-Control %7.7s: %d}\n",
HttpServerCCStr[i],
ReplyHeaderStats.cc[i]);
/*
- * $Id: ipcache.cc,v 1.85 1996/11/12 22:37:09 wessels Exp $
+ * $Id: ipcache.cc,v 1.86 1996/11/15 07:51:10 wessels Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
static long ipcache_low = 180;
static long ipcache_high = 200;
+static const char *const w_space = " \t\n\r";
#if LIBRESOLV_DNS_TTL_HACK
extern int _dns_ttl_;
/*
- * $Id: pinger.cc,v 1.16 1996/11/14 18:38:46 wessels Exp $
+ * $Id: pinger.cc,v 1.17 1996/11/15 07:51:11 wessels Exp $
*
* DEBUG: section 37 ICMP Routines
* AUTHOR: Duane Wessels
/* Junk so we can link with debug.o */
int opt_syslog_enable = 0;
volatile int unbuffered_logs = 1;
-const char *const w_space = " \t\n\r";
const char *const appname = "pinger";
struct timeval current_time;
time_t squid_curtime;