/*
- * $Id: CacheDigest.cc,v 1.29 1998/12/05 00:54:08 wessels Exp $
+ * $Id: CacheDigest.cc,v 1.30 2000/03/06 16:23:27 wessels Exp $
*
* DEBUG: section 70 Cache Digest
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: ETag.cc,v 1.5 1998/08/13 21:14:39 wessels Exp $
+ * $Id: ETag.cc,v 1.6 2000/03/06 16:23:27 wessels Exp $
*
* AUTHOR: Alex Rousskov
*
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpBody.cc,v 1.15 1998/07/22 20:36:42 wessels Exp $
+ * $Id: HttpBody.cc,v 1.16 2000/03/06 16:23:27 wessels Exp $
*
* DEBUG: section 56 HTTP Message Body
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpHdrCc.cc,v 1.19 1999/12/30 17:36:16 wessels Exp $
+ * $Id: HttpHdrCc.cc,v 1.20 2000/03/06 16:23:27 wessels Exp $
*
* DEBUG: section 65 HTTP Cache Control Header
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpHdrContRange.cc,v 1.11 1999/10/04 05:04:54 wessels Exp $
+ * $Id: HttpHdrContRange.cc,v 1.12 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 68 HTTP Content-Range Header
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpHdrExtField.cc,v 1.7 1999/04/15 06:15:40 wessels Exp $
+ * $Id: HttpHdrExtField.cc,v 1.8 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 69 HTTP Header: Extension Field
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpHdrRange.cc,v 1.20 1999/10/04 05:04:54 wessels Exp $
+ * $Id: HttpHdrRange.cc,v 1.21 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 64 HTTP Range Header
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpHeader.cc,v 1.65 1999/12/30 17:36:17 wessels Exp $
+ * $Id: HttpHeader.cc,v 1.66 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 55 HTTP Header
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{"Content-MD5", HDR_CONTENT_MD5, ftStr}, /* for now */
{"Content-Range", HDR_CONTENT_RANGE, ftPContRange},
{"Content-Type", HDR_CONTENT_TYPE, ftStr},
+ {"Cookie", HDR_COOKIE, ftStr},
{"Date", HDR_DATE, ftDate_1123},
{"ETag", HDR_ETAG, ftETag},
{"Expires", HDR_EXPIRES, ftDate_1123},
Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
return httpHeaderIdByName(name, name_len, Headers, HDR_ENUM_END);
}
+
+const char *
+httpHeaderNameById(int id)
+{
+ if (!Headers)
+ Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
+ assert(id >= 0 && id < HDR_ENUM_END);
+ return HeadersAttrs[id].name;
+}
/*
- * $Id: HttpHeaderTools.cc,v 1.26 1999/10/04 05:04:56 wessels Exp $
+ * $Id: HttpHeaderTools.cc,v 1.27 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 66 HTTP Header Tools
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpMsg.cc,v 1.6 1998/08/18 03:07:05 wessels Exp $
+ * $Id: HttpMsg.cc,v 1.7 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 74 HTTP Message
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpReply.cc,v 1.39 1999/12/30 17:36:17 wessels Exp $
+ * $Id: HttpReply.cc,v 1.40 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 58 HTTP Reply (Response)
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpRequest.cc,v 1.25 1999/12/30 17:36:18 wessels Exp $
+ * $Id: HttpRequest.cc,v 1.26 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 73 HTTP Request
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: HttpStatusLine.cc,v 1.18 1999/04/15 06:15:42 wessels Exp $
+ * $Id: HttpStatusLine.cc,v 1.19 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 57 HTTP Status-line
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: MemBuf.cc,v 1.22 1999/01/19 02:24:19 wessels Exp $
+ * $Id: MemBuf.cc,v 1.23 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 59 auto-growing Memory Buffer with printf
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: Packer.cc,v 1.11 1999/01/19 02:24:20 wessels Exp $
+ * $Id: Packer.cc,v 1.12 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 60 Packer: A uniform interface to store-like modules
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: StatHist.cc,v 1.23 1999/01/19 02:24:20 wessels Exp $
+ * $Id: StatHist.cc,v 1.24 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 62 Generic Histogram
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: String.cc,v 1.7 1998/07/22 20:36:55 wessels Exp $
+ * $Id: String.cc,v 1.8 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: access_log.cc,v 1.53 1999/12/30 17:36:19 wessels Exp $
+ * $Id: access_log.cc,v 1.54 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 46 Access Log
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
"TCP_MEM_HIT",
"TCP_DENIED",
"TCP_OFFLINE_HIT",
+#if LOG_TCP_REDIRECTS
+ "TCP_REDIRECT",
+#endif
"UDP_HIT",
"UDP_MISS",
"UDP_DENIED",
xstrncpy(LogfileName, fname, SQUID_MAXPATHLEN);
LogfileFD = file_open(LogfileName, O_WRONLY | O_CREAT);
if (LogfileFD == DISK_ERROR) {
- debug(50, 0) ("%s: %s\n", LogfileName, xstrerror());
- fatalf("Cannot open %s: %s", LogfileName, xstrerror());
+ if (ENOENT == errno) {
+ fatalf("%s cannot be created, since the\n"
+ "\tdirectory it is to reside in does not exist."
+ "\t(%s)\n", LogfileName, xstrerror());
+ } else if (EACCES == errno) {
+ fatalf("cannot create %s:\n"
+ "\t%s.\n"
+ "\tThe directory access.log is to reside in needs to be\n"
+ "\twriteable by the user %s, the cache_effective_user\n"
+ "\tset in squid.conf.",
+ LogfileName, xstrerror(), Config.effectiveUser);
+ } else {
+ debug(50, 0) ("%s: %s\n", LogfileName, xstrerror());
+ fatalf("Cannot open %s: %s", LogfileName, xstrerror());
+ }
}
LogfileStatus = LOG_ENABLE;
}
/*
- * $Id: acl.cc,v 1.211 2000/01/14 08:37:03 wessels Exp $
+ * $Id: acl.cc,v 1.212 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
* Squid is the result of efforts by numerous individuals from the
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
- * National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * National Science Foundation. Squid is Copyrighted (C) 2000 by
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* NOTREACHED */
case ACL_MAXCONN:
k = clientdbEstablished(checklist->src_addr, 0);
- return ((k > ((intlist *) ae->data)->i) ? 0 : 1);
+ return ((k > ((intlist *) ae->data)->i) ? 1 : 0);
/* NOTREACHED */
case ACL_URL_PORT:
return aclMatchIntegerRange(ae->data, (int) r->port);
#endif
#include <net/route.h>
#include <net/if.h>
+#if HAVE_NETINET_IF_ETHER_H
#include <netinet/if_ether.h>
+#endif
/*
* Decode an ascii representation (asc) of an ethernet adress, and place
/*
- * $Id: asn.cc,v 1.58 1999/12/30 17:36:22 wessels Exp $
+ * $Id: asn.cc,v 1.59 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: authenticate.cc,v 1.11 1999/04/27 22:11:28 wessels Exp $
+ * $Id: authenticate.cc,v 1.12 2000/03/06 16:23:28 wessels Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: cache_cf.cc,v 1.336 2000/01/14 08:37:04 wessels Exp $
+ * $Id: cache_cf.cc,v 1.337 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static const char *const B_GBYTES_STR = "GB";
static const char *const list_sep = ", \t\n\r";
-
-static int http_header_first = 0;
+static int http_header_first;
+static int http_header_allowed = 0;
static void configDoConfigure(void);
static void parse_refreshpattern(refresh_t **);
cfg_filename = token + 1;
memset(config_input_line, '\0', BUFSIZ);
config_lineno = 0;
+ http_header_first = 0;
while (fgets(config_input_line, BUFSIZ, fp)) {
config_lineno++;
if ((token = strchr(config_input_line, '\n')))
Config.Announce.period = 86400 * 365; /* one year */
Config.onoff.announce = 0;
}
+#if USE_DNSSERVER
if (Config.dnsChildren < 1)
fatal("No dnsservers allocated");
if (Config.dnsChildren > DefaultDnsChildrenMax) {
DefaultDnsChildrenMax);
Config.dnsChildren = DefaultDnsChildrenMax;
}
+#endif
if (Config.Program.redirect) {
if (Config.redirectChildren < 1) {
Config.redirectChildren = 0;
}
#endif
requirePathnameExists("MIME Config Table", Config.mimeTablePathname);
+#if USE_DNSSERVER
requirePathnameExists("cache_dns_program", Config.Program.dnsserver);
+#endif
requirePathnameExists("unlinkd_program", Config.Program.unlinkd);
if (Config.Program.redirect)
requirePathnameExists("redirect_program", Config.Program.redirect->key);
static void
dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header)
{
- storeAppendPrintf(entry, "%s\n", name);
+ int i;
+ for (i = 0; i < HDR_OTHER; i++) {
+ if (http_header_allowed && !CBIT_TEST(header, i))
+ storeAppendPrintf(entry, "%s allow %s\n", name, httpHeaderNameById(i));
+ else if (!http_header_allowed && CBIT_TEST(header, i))
+ storeAppendPrintf(entry, "%s deny %s\n", name, httpHeaderNameById(i));
+ }
}
static void
{
int allowed, id;
char *t = NULL;
-
if ((t = strtok(NULL, w_space)) == NULL) {
debug(3, 0) ("%s line %d: %s\n",
cfg_filename, config_lineno, config_input_line);
debug(3, 0) ("parse_http_header: expecting 'allow' or 'deny', got '%s'.\n", t);
return;
}
-
if (!http_header_first) {
http_header_first = 1;
- if (allowed)
+ if (allowed) {
+ http_header_allowed = 1;
httpHeaderMaskInit(header, 0xFF);
+ } else {
+ http_header_allowed = 0;
+ httpHeaderMaskInit(header, 0);
+ }
}
while ((t = strtok(NULL, w_space))) {
if ((id = httpHeaderIdByNameDef(t, strlen(t))) == -1)
- id = HDR_OTHER;
- if (allowed)
+ debug(3, 0) ("parse_http_header: Ignoring unknown header '%s'\n", t);
+ else if (allowed)
CBIT_CLR(*header, id);
else
CBIT_SET(*header, id);
}
#define free_onoff free_int
-#define free_httpanonymizer free_int
#define dump_eol dump_string
#define free_eol free_string
{
char *token;
char *t;
- char *host = NULL;
+ char *host;
const struct hostent *hp;
- int i;
+ unsigned short port;
sockaddr_in_list *s;
while ((token = strtok(NULL, w_space))) {
+ host = NULL;
+ port = 0;
if ((t = strchr(token, ':'))) {
/* host:port */
host = token;
*t = '\0';
- i = atoi(t + 1);
- if (i <= 0)
+ port = (unsigned short) atoi(t + 1);
+ if (0 == port)
self_destruct();
- } else if ((i = atoi(token)) > 0) {
+ } else if ((port = atoi(token)) > 0) {
/* port */
} else {
self_destruct();
}
s = xcalloc(1, sizeof(*s));
- s->s.sin_port = htons(i);
+ s->s.sin_port = htons(port);
if (NULL == host)
s->s.sin_addr = any_addr;
else if (1 == safe_inet_addr(host, &s->s.sin_addr))
(void) 0;
- else if ((hp = gethostbyname(token))) /* dont use ipcache */
+ else if ((hp = gethostbyname(host))) /* dont use ipcache */
s->s.sin_addr = inaddrFromHostent(hp);
else
self_destruct();
/*
- * $Id: cache_diff.cc,v 1.10 1998/07/22 20:37:02 wessels Exp $
+ * $Id: cache_diff.cc,v 1.11 2000/03/06 16:23:29 wessels Exp $
*
* AUTHOR: Alex Rousskov
*
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: cache_manager.cc,v 1.20 1999/01/19 02:24:21 wessels Exp $
+ * $Id: cache_manager.cc,v 1.21 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: section 16 Cache Manager Objects
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: cachemgr.cc,v 1.86 1999/04/19 04:42:37 wessels Exp $
+ * $Id: cachemgr.cc,v 1.87 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: section 0 CGI Cache Manager
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: carp.cc,v 1.6 1998/08/17 21:55:20 wessels Exp $
+ * $Id: carp.cc,v 1.7 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: section 39 Cache Array Routing Protocol
* AUTHOR: Eric Stern
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
url_hash += (url_hash << 19) + *c;
/* select peer */
for (tp = Config.peers; tp; tp = tp->next) {
+ if (0.0 == tp->carp.load_factor)
+ continue;
+ if (tp->tcp_up != PEER_TCP_MAGIC_COUNT)
+ continue;
assert(tp->type == PEER_PARENT);
combined_hash = (url_hash ^ tp->carp.hash);
combined_hash += combined_hash * 0x62531965;
/*
- * $Id: cbdata.cc,v 1.28 1999/09/28 23:48:46 wessels Exp $
+ * $Id: cbdata.cc,v 1.29 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: section 45 Callback Data Registry
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#
-# $Id: cf.data.pre,v 1.165 2000/01/31 23:23:04 wessels Exp $
+# $Id: cf.data.pre,v 1.166 2000/03/06 16:23:29 wessels Exp $
#
#
# SQUID Internet Object Cache http://squid.nlanr.net/Squid/
# Internet community. Development is led by Duane Wessels of the
# National Laboratory for Applied Network Research and funded by the
# National Science Foundation. Squid is Copyrighted (C) 1998 by
-# Duane Wessels and the University of California San Diego. Please
-# see the COPYRIGHT file for full details. Squid incorporates
-# software developed and/or copyrighted by other sources. Please see
-# the CREDITS file for full details.
+# the Regents of the University of California. Please see the
+# COPYRIGHT file for full details. Squid incorporates software
+# developed and/or copyrighted by other sources. Please see the
+# CREDITS file for full details.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
various options happen to be. If you don't need to change the
default, you shouldn't uncomment the line. Doing so may cause
run-time problems. In some cases "none" refers to no default
- setting at all, whilst in other cases it refers to a valid
+ setting at all, while in other cases it refers to a valid
option - the comments for that keyword indicate if this is the
case.
The default port number is 3128.
- If you are running Squid in accelerateor mode, then you
+ If you are running Squid in accelerator mode, then you
probably want to listen on port 80 also, or instead.
The -a command line option will override the *first* port
number listed here. That option will NOT override an IP
address, however.
+ You may specify multiple socket addresses on multiple lines.
+
http_port 3128
DOC_END
receive replies from multicast group members.
You must be very careful to NOT use a multicast address which
- is already in use by another group of caches. NLANR has been
- assigned a block of multicast address space for use in Web
- Caching. Plese write to us at nlanr-cache@nlanr.net to receive
- an address for your own use.
+ is already in use by another group of caches.
If you are unsure about multicast, please read the Multicast
chapter in the Squid FAQ (http://squid.nlanr.net/Squid/FAQ/).
udp_outgoing_address is used for ICP packets sent out to other
caches.
- The default behaviour is to not bind to any specific address.
+ The default behavior is to not bind to any specific address.
NOTE, udp_incoming_address and udp_outgoing_address can not
have the same value (unless it is 0.0.0.0) since they both use
TYPE: int
LOC: Config.Timeout.icp_query_max
DOC_START
- When you use the dynamic ICP query timeout (by setting
- 'icp_query_timeout' to zero) you might want to place an
- upper limit on the timeout value.
+ Normally the ICP query timeout is determined dynamically. But
+ sometimes it can lead to very large values (say 5 seconds).
+ Use this option to put an upper limit on the dynamic timeout
+ value. Do NOT use this option to always use a fixed (instead
+ of a dynamic) timeout value.
- If 'icp_query_timeout' is set to zero, this value is ignored.
-icp_query_timeout 2000
+ If 'icp_query_timeout' is set to zero, then this value is
+ ignored.
+maximum_icp_query_timeout 2000
DOC_END
NAME: mcast_icp_query_timeout
You can specify multiple cache_dir lines to spread the
cache among different disk partitions.
- Type specifies the kind of storage system to use. If you
- don't know what to put here, then use "ufs".
+ Type specifies the kind of storage system to use. Most
+ everyone will want to use "ufs" as the type. If you are using
+ Async I/O (--enable async-io) on Linux or Solaris, then you may
+ want to try "asyncufs" as the type. Async IO support may be
+ buggy, however, so beware.
'Directory' is a top-level directory where cache swap
files will be stored. If you want to use an entire disk
LOC: Config.Log.log
DOC_START
Cache logging file. This is where general information about
- your cache's behaviour goes. You can increase the amount of data
+ your cache's behavior goes. You can increase the amount of data
logged to this file with the "debug_options" tag below.
cache_log @DEFAULT_CACHE_LOG@
Logs the activities of the storage manager. Shows which
objects are ejected from the cache, and which objects are
saved and for how long. To disable, enter "none". There are
- not really utilities to analyse this data, so you can safely
+ not really utilities to analyze this data, so you can safely
disable it.
cache_store_log @DEFAULT_STORE_LOG@
programs use. To disable/enable this emulation, set
emulate_httpd_log to 'off' or 'on'. The default
is to use the native log format since it includes useful
- information that Squid-specific log analysers use.
+ information that Squid-specific log analyzers use.
emulate_httpd_log off
DOC_END
DOC_START
If you want the anonymous login password to be more informative
(and enable the use of picky ftp servers), set this to something
- resonable for your domain, like wwwuser@somewhere.net
+ reasonable for your domain, like wwwuser@somewhere.net
The reason why this is domainless by default is that the
request can be made on the behalf of a user in any domain,
NAME: cache_dns_program
TYPE: string
+IFDEF: USE_DNSSERVER
DEFAULT: @DEFAULT_DNSSERVER@
LOC: Config.Program.dnsserver
DOC_START
NAME: dns_children
TYPE: int
+IFDEF: USE_DNSSERVER
DEFAULT: 5
LOC: Config.dnsChildren
DOC_START
probably increase this value to at least 10. The maximum
is 32. The default is 5.
- To disable dnsservers, set this to 0. NOTE, this is very
- strongly discouraged. If you disable dnsservers your Squid
- process will BLOCK on DNS lookups!
+ You must have at least one dnsserver process.
dns_children 5
DOC_END
NAME: dns_defnames
COMMENT: on|off
+IFDEF: USE_DNSSERVER
TYPE: onoff
DEFAULT: off
LOC: Config.onoff.res_defnames
LOC: Config.Program.pinger
DOC_START
Specify the location of the executable for the pinger process.
- This is only useful if you configured Squid (during compliation)
+ This is only useful if you configured Squid (during compilation)
with the '--enable-icmp' option.
pinger_program @DEFAULT_PINGER@
DEFAULT: 0
LOC: Config.maxReplyBodySize
DOC_START
- This specifies the maximum size for an HTTP reply body.
- This can be used to restrict users from downloading very
- large files. If the reply headers include a content-length
- value, then we can recognize large reply bodies early and
- avoid downloading any of it. If not, we will download as
- much data up to this limit and then ungraciously terminate
- the transfer. If you set this parameter to zero, there
- will be no limit imposed.
+ This option specifies the maximum size of a reply body. It
+ can be used to prevent users from downloading very large files,
+ such as MP3's and movies. The reply size is checked twice.
+ First when we get the reply headers, we check the
+ content-length value. If the content length value exists and
+ is larger than this parameter, the request is denied and the
+ user receives an error message that says "the request or reply
+ is too large." If there is no content-length, and the reply
+ size exceeds this limit, the client's connection is just closed
+ and they will receive a partial reply.
+
+ NOTE: downstream caches probably can not detect a partial reply
+ if there is no content-length header, so they will cache
+ partial responses and give them out as hits. You should NOT
+ use this option if you have downstream caches.
+
+ If you set this parameter to zero (the default), there will be
+ no limit imposed.
reply_body_max_size 0
DOC_END
'Min' is the time (in minutes) an object without an explicit
expiry time should be considered fresh. The recommended
value is 0, any higher values may cause dynamic applications
- to be erronously cached unless the application designer
+ to be erroneously cached unless the application designer
has taken the appropriate actions.
'Percent' is a percentage of the objects age (time since last
- modification age) an object without explicit exipry time
+ modification age) an object without explicit expiry time
will be considered fresh.
'Max' is an upper limit on how long objects without an explicit
to maximize the potential byte hit rate improvement of LFUDA.
For more information about these cache replacement policies see
- http://www.hpl.hp.com/personal/John_Dilley/caching/wcw.html and
+ http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html and
http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
replacement_policy LFUDA
DOC_START
The maximum amount of time that a client (browser) is allowed to
remain connected to the cache process. This protects the Cache
- from having alot of sockets (and hence file descriptors) tied up
+ from having a lot of sockets (and hence file descriptors) tied up
in a CLOSE_WAIT state from remote clients that go away without
properly shutting down (either because of a network failure or
because of a poor client implementation). The default is one
acl aclname dst ip-address/netmask ... (URL host's IP address)
acl aclname myip ip-address/netmask ... (local socket IP address)
- acl aclname srcdomain foo.com ... # reverse lookup, client IP
- acl aclname dstdomain foo.com ... # Destination server from URL
+ acl aclname srcdomain .foo.com ... # reverse lookup, client IP
+ acl aclname dstdomain .foo.com ... # Destination server from URL
acl aclname srcdom_regex [-i] xxx ... # regex matching client name
acl aclname dstdom_regex [-i] xxx ... # regex matching server
# For dstdomain and dstdom_regex a reverse lookup is tried if a IP
create cache hierarchies.
An 'announcement' message is sent (via UDP) to the registration
- service by Squid. By default, the annoucement message is NOT
+ service by Squid. By default, the announcement message is NOT
SENT unless you enable it with 'announce_period' below.
The announcement message includes your hostname, plus the
allow specific headers (thus denying all others), or you
may deny specific headers (thus allowing all others).
- For example, to achieve the same behaviour as the old
+ For example, to achieve the same behavior as the old
'http_anonymizer standard' option, you should use:
anonymize_headers deny From Referer Server
anonymize_headers allow Content-Encoding Content-Length
anonymize_headers allow Content-Type Date Expires Host
anonymize_headers allow If-Modified-Since Last-Modified
- anonymize_headers allow Location Pragma Accept Charset
+ anonymize_headers allow Location Pragma Accept
anonymize_headers allow Accept-Encoding Accept-Language
anonymize_headers allow Content-Language Mime-Version
anonymize_headers allow Retry-After Title Connection
DEFAULT: @DEFAULT_ERROR_DIR@
DOC_START
If you wish to create your own versions of the default
- (English) error files, either to customise them to suit your
- language or company copy the template english files to another
+ (English) error files, either to customize them to suit your
+ language or company copy the template English files to another
directory and point this tag at them.
DOC_END
snmp_access allow|deny [!]aclname ...
Example:
-snmp_access allow snmpppublic localhost
+snmp_access allow snmppublic localhost
snmp_access deny all
DOC_END
snmp_outgoing_address is used for SNMP packets returned to SNMP
agents.
- The default behaviour is to not bind to any specific address.
+ The default behavior is to not bind to any specific address.
NOTE, snmp_incoming_address and snmp_outgoing_address can not have
the same value since they both use port 3130.
DEFAULT: 0.0.0.0
IFDEF: USE_WCCP
DOC_START
- Specifies the router that will manage WCCP for this
- cache.
-
-wccp_router 10.0.0.1
+ Use this option to define your WCCP ``home'' router for
+ Squid. Setting the 'wccp_router' to 0.0.0.0 (the default)
+ disables WCCP.
+wccp_router 0.0.0.0
DOC_END
NAME: wccp_incoming_address
DEFAULT: 255.255.255.255
IFDEF: USE_WCCP
DOC_START
- Just like 'udp_incoming_address' above, but for the WCCP port.
+ wccp_incoming_address Use this option if you require WCCP
+ messages to be received on only one
+ interface. Do NOT use this option if
+ you're unsure how many interfaces you
+ have, or if you know you have only one
+ interface.
- wccp_incoming_address is used for the WCCP socket receiving
- messages from WCCP routers.
- wccp_outgoing_address is used for WCCP packets returned to WCCP
- routers.
+ wccp_outgoing_address Use this option if you require WCCP
+ messages to be sent out on only one
+ interface. Do NOT use this option if
+ you're unsure how many interfaces you
+ have, or if you know you have only one
+ interface.
- The default behaviour is to not bind to any specific address.
+ The default behavior is to not bind to any specific address.
NOTE, wccp_incoming_address and wccp_outgoing_address can not have
the same value since they both use port 2048.
LOC: Config.Delay
DOC_START
This is used to determine which delay pool a request falls into.
- The first matched delay pool is always used, ie, if a request falls
+ The first matched delay pool is always used, i.e., if a request falls
into delay pool number one, no more delay are checked, otherwise the
rest are checked in order of their delay pool number until they have
all been checked. For example, if you want some_big_clients in delay
LOC: Config.mcast_miss.port
DEFAULT: 3135
DOC_START
- This is the port number to be used in conjuction with
+ This is the port number to be used in conjunction with
'mcast_miss_addr'.
DOC_END
This controls whether the server will generate a Cache Digest
of its contents. By default, Cache Digest generation is
enabled if Squid is compiled with USE_CACHE_DIGESTS defined.
-
digest_generation on
DOC_END
This is the number of bits of the server's Cache Digest which
will be associated with the Digest entry for a given HTTP
Method and URL (public key) combination. The default is 5.
-
digest_bits_per_entry 5
DOC_END
NAME: digest_rebuild_period
IFDEF: USE_CACHE_DIGESTS
-TYPE: int
+COMMENT: (seconds)
+TYPE: time_t
LOC: Config.digest.rebuild_period
-DEFAULT: 3600
+DEFAULT: 1 hour
DOC_START
This is the number of seconds between Cache Digest rebuilds.
- By default the server's Digest is rebuilt every hour - 60
- minutes * 60 seconds per minute, 3600 seconds.
-
-digest_rebuild_period 3600
+ By default the server's Digest is rebuilt every hour.
+digest_rebuild_period 1 hour
DOC_END
NAME: digest_rewrite_period
+COMMENT: (seconds)
IFDEF: USE_CACHE_DIGESTS
-TYPE: int
+TYPE: time_t
LOC: Config.digest.rewrite_period
-DEFAULT: 3600
+DEFAULT: 1 hour
DOC_START
This is the number of seconds between Cache Digest writes to
disk. By default the server's Digest is written to disk every
- hour - 60 minutes * 60 seconds per minute, 3600 seconds.
-
-digest_rewrite_period 3600
+ hour.
+digest_rewrite_period 1 hour
DOC_END
NAME: digest_swapout_chunk_size
+COMMENT: (bytes)
+TYPE: b_size_t
IFDEF: USE_CACHE_DIGESTS
-TYPE: int
LOC: Config.digest.swapout_chunk_size
-DEFAULT: 4096
+DEFAULT: 4096 bytes
DOC_START
This is the number of bytes of the Cache Digest to write to
- disk at a time. It defaults to 4096 (4KB), the Squid default
- swap page.
-
-digest_swapout_chunk_size 4096
+ disk at a time. It defaults to 4096 bytes (4KB), the Squid
+ default swap page.
+digest_swapout_chunk_size 4096 bytes
DOC_END
NAME: digest_rebuild_chunk_percentage
+COMMENT: (percent, 0-100)
IFDEF: USE_CACHE_DIGESTS
TYPE: int
LOC: Config.digest.rebuild_chunk_percentage
DEFAULT: 10
DOC_START
- This is the portion (where 0 < portion <= 100) of the Cache Digest
- to be scanned at a time. By default it is set to 10 (10%) of
- the Cache Digest.
-
+ This is the percentage of the Cache Digest to be scanned at a
+ time. By default it is set to 10% of the Cache Digest.
digest_rebuild_chunk_percentage 10
DOC_END
+NAME: chroot
+TYPE: string
+LOC: Config.chroot_dir
+DEFAULT: none
+DOC_START
+ Use this to have Squid do a chroot() while initializing. This
+ also causes Squid to fully drop root privileges after
+ initializing. This means, for example, that if you use a HTTP
+ port less than 1024 and try to reconfigure, you will get an
+ error.
+DOC_END
+EOF
+
+NAME: client_persistent_connections
+TYPE: onoff
+LOC: Config.onoff.client_pconns
+DEFAULT: on
+DOC_NONE
+
+NAME: server_persistent_connections
+TYPE: onoff
+LOC: Config.onoff.server_pconns
+DEFAULT: on
+DOC_START
+ Persistent connection support for clients and servers. By
+ default, Squid uses persistent connections (when allowed)
+ with its clients and servers. You can use these options to
+ disable persistent connections with clients and/or servers.
+client_persistent_connections on
+server_persistent_connections on
+DOC_END
EOF
/*
- * $Id: cf_gen.cc,v 1.32 1999/04/15 06:15:47 wessels Exp $
+ * $Id: cf_gen.cc,v 1.33 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: none
* AUTHOR: Max Okumoto
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: client.cc,v 1.86 1999/10/04 05:05:03 wessels Exp $
+ * $Id: client.cc,v 1.87 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: section 0 WWW Client
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: client_db.cc,v 1.47 1999/10/04 05:05:03 wessels Exp $
+ * $Id: client_db.cc,v 1.48 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: section 0 Client Database
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: client_side.cc,v 1.470 2000/01/19 21:57:30 wessels Exp $
+ * $Id: client_side.cc,v 1.471 2000/03/06 16:23:29 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static int httpAcceptDefer(void);
static log_type clientProcessRequest2(clientHttpRequest * http);
static int clientReplyBodyTooLarge(int clen);
+static int clientRequestBodyTooLarge(int clen);
static int
checkAccelOnly(clientHttpRequest * http)
clientHttpRequest *http = data;
ConnStateData *conn = http->conn;
if (checkAccelOnly(http)) {
- clientAccessCheckDone(0, http);
+ clientAccessCheckDone(ACCESS_ALLOWED, http);
return;
}
http->acl_checklist = aclChecklistCreate(Config.accessList.http,
request->http_ver);
debug(33, 3) ("clientSetKeepaliveFlag: method = %s\n",
RequestMethodStr[request->method]);
- /*
- * If we wanted to limit the number of client-side idle persistent
- * connections, this is a good place to do it.
- */
- if (httpMsgIsPersistent(request->http_ver, req_hdr))
+ if (!Config.onoff.client_pconns)
+ request->flags.proxy_keepalive = 0;
+ else if (httpMsgIsPersistent(request->http_ver, req_hdr))
request->flags.proxy_keepalive = 1;
}
if (request->range)
clientBuildRangeHeader(http, rep);
/*
- * Add Age header, not that our header must replace Age headers
- * from other caches if any
+ * Add a estimated Age header on cache hits.
*/
- if (http->entry->timestamp > 0) {
+ if (is_hit) {
+ /*
+ * Remove any existing Age header sent by upstream caches
+ * (note that the existing header is passed along unmodified
+ * on cache misses)
+ */
httpHeaderDelById(hdr, HDR_AGE);
/*
- * we do not follow HTTP/1.1 precisely here becuase we rely
- * on Date header when computing entry->timestamp; we should
- * be using _request_ time if Date header is not available
- * or if it is out of sync
+ * This adds the calculated object age. Note that the details of the
+ * age calculation is performed by adjusting the timestamp in
+ * storeTimestampsSet(), not here.
+ *
+ * BROWSER WORKAROUND: IE sometimes hangs when receiving a 0 Age
+ * header, so don't use it unless there is a age to report. Please
+ * note that Age is only used to make a conservative estimation of
+ * the objects age, so a Age: 0 header does not add any useful
+ * information to the reply in any case.
*/
- httpHeaderPutInt(hdr, HDR_AGE,
- http->entry->timestamp <= squid_curtime ?
- squid_curtime - http->entry->timestamp : 0);
+ if (http->entry->timestamp < squid_curtime)
+ httpHeaderPutInt(hdr, HDR_AGE,
+ squid_curtime - http->entry->timestamp);
}
/* Append X-Cache */
httpHeaderPutStrf(hdr, HDR_X_CACHE, "%s from %s",
return 0;
}
+static int
+clientRequestBodyTooLarge(int clen)
+{
+ if (0 == Config.maxRequestBodySize)
+ return 0; /* disabled */
+ if (clen < 0)
+ return 0; /* unknown, bug? */
+ if (clen > Config.maxRequestBodySize)
+ return 1; /* too large */
+ return 0;
+}
+
/*
* accepts chunk of a http message in buf, parses prefix, filters headers and
* such, writes processed message to the client's socket
} else if ((done = clientCheckTransferDone(http)) != 0 || size == 0) {
debug(33, 5) ("clientWriteComplete: FD %d transfer is DONE\n", fd);
/* We're finished case */
- if (http->entry->mem_obj->reply->content_length < 0) {
+ if (httpReplyBodySize(http->request->method, entry->mem_obj->reply) < 0) {
debug(33, 5) ("clientWriteComplete: closing, content_length < 0\n");
comm_close(fd);
} else if (!done) {
http->entry = clientCreateStoreEntry(http, r->method, r->flags);
if (http->redirect.status) {
HttpReply *rep = httpReplyCreate();
+#if LOG_TCP_REDIRECTS
+ http->log_type = LOG_TCP_REDIRECT;
+#endif
storeReleaseRequest(http->entry);
httpRedirectReply(rep, http->redirect.status, http->redirect.location);
httpReplySwapOut(rep, http->entry);
commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
if (request->content_length < 0)
(void) 0;
- else if (request->content_length > Config.maxRequestBodySize) {
+ else if (clientRequestBodyTooLarge(request->content_length)) {
err = errorCon(ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE);
err->request = requestLink(request);
http->entry = clientCreateStoreEntry(http,
k = conn->in.size - 1 - conn->in.offset;
if (k == 0) {
if (conn->in.offset >= Config.maxRequestHeaderSize) {
- int fd = open("/tmp/error:request-too-large", O_WRONLY | O_CREAT | O_TRUNC);
- if (fd >= 0) {
- write(fd, conn->in.buf, conn->in.offset);
- close(fd);
- }
/* The request is too large to handle */
debug(33, 1) ("Request header is too large (%d bytes)\n",
(int) conn->in.offset);
static int
clientGotNotEnough(clientHttpRequest * http)
{
- int cl = http->entry->mem_obj->reply->content_length;
+ int cl = httpReplyBodySize(http->request->method, http->entry->mem_obj->reply);
int hs = http->entry->mem_obj->reply->hdr_sz;
assert(cl >= 0);
if (http->out.offset < cl + hs)
/*
- * $Id: comm.cc,v 1.304 1999/12/30 17:36:27 wessels Exp $
+ * $Id: comm.cc,v 1.305 2000/03/06 16:23:30 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: comm_select.cc,v 1.40 2000/01/11 04:37:44 wessels Exp $
+ * $Id: comm_select.cc,v 1.41 2000/03/06 16:23:30 wessels Exp $
*
* DEBUG: section 5 Socket Functions
*
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: debug.cc,v 1.77 1999/10/04 05:05:07 wessels Exp $
+ * $Id: debug.cc,v 1.78 2000/03/06 16:23:30 wessels Exp $
*
* DEBUG: section 0 Debug Routines
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: defines.h,v 1.77 1999/12/30 17:36:29 wessels Exp $
+ * $Id: defines.h,v 1.78 2000/03/06 16:23:30 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: delay_pools.cc,v 1.12 1999/12/30 17:36:30 wessels Exp $
+ * $Id: delay_pools.cc,v 1.13 2000/03/06 16:23:30 wessels Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: David Luyer <luyer@ucs.uwa.edu.au>
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
int aggregate;
};
+#define IND_MAP_SZ 256
+
struct _class2DelayPool {
int aggregate;
/* OK: -1 is terminator. individual[255] is always host 255. */
/* 255 entries + 1 terminator byte */
- unsigned char individual_map[256];
+ unsigned char individual_map[IND_MAP_SZ];
unsigned char individual_255_used;
/* 256 entries */
- int individual[256];
+ int individual[IND_MAP_SZ];
};
+#define NET_MAP_SZ 256
+#define C3_IND_SZ (NET_MAP_SZ*IND_MAP_SZ)
+
struct _class3DelayPool {
int aggregate;
/* OK: -1 is terminator. network[255] is always host 255. */
/* 255 entries + 1 terminator byte */
- unsigned char network_map[256];
+ unsigned char network_map[NET_MAP_SZ];
unsigned char network_255_used;
/* 256 entries */
int network[256];
/* 256 sets of (255 entries + 1 terminator byte) */
- unsigned char individual_map[256][256];
+ unsigned char individual_map[NET_MAP_SZ][IND_MAP_SZ];
/* Pack this into one bit per net */
unsigned char individual_255_used[32];
/* largest entry = (255<<8)+255 = 65535 */
- int individual[65536];
+ int individual[C3_IND_SZ];
};
typedef struct _class1DelayPool class1DelayPool;
if (host == 255) {
if (!delay_data[pool].class2->individual_255_used) {
delay_data[pool].class2->individual_255_used = 1;
- delay_data[pool].class2->individual[255] =
+ delay_data[pool].class2->individual[IND_MAP_SZ - 1] =
(Config.Delay.rates[pool]->individual.max_bytes *
Config.Delay.initial) / 100;
}
return delayId(pool + 1, 255);
}
- for (i = 0;; i++) {
+ for (i = 0; i < IND_MAP_SZ; i++) {
if (delay_data[pool].class2->individual_map[i] == host)
break;
if (delay_data[pool].class2->individual_map[i] == 255) {
delay_data[pool].class2->individual_map[i] = host;
+ assert(i < (IND_MAP_SZ - 1));
delay_data[pool].class2->individual_map[i + 1] = 255;
delay_data[pool].class2->individual[i] =
(Config.Delay.rates[pool]->individual.max_bytes *
Config.Delay.initial) / 100;
}
} else {
- for (i = 0;; i++) {
+ for (i = 0; i < NET_MAP_SZ; i++) {
if (delay_data[pool].class3->network_map[i] == net)
break;
if (delay_data[pool].class3->network_map[i] == 255) {
delay_data[pool].class3->network_map[i] = net;
delay_data[pool].class3->individual_map[i][0] = 255;
+ assert(i < (NET_MAP_SZ - 1));
delay_data[pool].class3->network_map[i + 1] = 255;
delay_data[pool].class3->network[i] =
(Config.Delay.rates[pool]->network.max_bytes *
position |= 255;
if (!(delay_data[pool].class3->individual_255_used[i / 8] & (1 << (i % 8)))) {
delay_data[pool].class3->individual_255_used[i / 8] |= (1 << (i % 8));
+ assert(position < C3_IND_SZ);
delay_data[pool].class3->individual[position] =
(Config.Delay.rates[pool]->individual.max_bytes *
Config.Delay.initial) / 100;
}
return delayId(pool + 1, position);
}
- for (j = 0;; j++) {
+ assert(i < NET_MAP_SZ);
+ for (j = 0; j < IND_MAP_SZ; j++) {
if (delay_data[pool].class3->individual_map[i][j] == host) {
position |= j;
break;
}
if (delay_data[pool].class3->individual_map[i][j] == 255) {
delay_data[pool].class3->individual_map[i][j] = host;
+ assert(j < (IND_MAP_SZ - 1));
delay_data[pool].class3->individual_map[i][j + 1] = 255;
- delay_data[pool].class3->individual[position |= j] =
+ position |= j;
+ assert(position < C3_IND_SZ);
+ delay_data[pool].class3->individual[position] =
(Config.Delay.rates[pool]->individual.max_bytes *
Config.Delay.initial) / 100;
break;
delayUpdateClass2(class2DelayPool * class2, delaySpecSet * rates, int incr)
{
int restore_bytes;
- unsigned char i;
+ unsigned int i;
/* delaySetSpec may be pointer to partial structure so MUST pass by
* reference.
*/
else
i = 0;
for (;;) {
+ assert(i < IND_MAP_SZ);
if (i != 255 && class2->individual_map[i] == 255)
return;
if (class2->individual[i] != rates->individual.max_bytes &&
(class2->individual[i] += restore_bytes) > rates->individual.max_bytes)
class2->individual[i] = rates->individual.max_bytes;
- if (++i == 255)
+ if (++i == (IND_MAP_SZ - 1))
return;
}
}
{
int individual_restore_bytes, network_restore_bytes;
int mpos;
- unsigned char i, j;
+ unsigned int i, j;
/* delaySetSpec may be pointer to partial structure so MUST pass by
* reference.
*/
else
i = 0;
for (;;) {
+ assert(i < NET_MAP_SZ);
if (i != 255 && class3->network_map[i] == 255)
return;
if (individual_restore_bytes != -incr) {
else
j = 0;
for (;;) {
+ assert(i < NET_MAP_SZ);
+ assert(j < IND_MAP_SZ);
if (j != 255 && class3->individual_map[i][j] == 255)
break;
+ assert(mpos < C3_IND_SZ);
if (class3->individual[mpos] != rates->individual.max_bytes &&
(class3->individual[mpos] += individual_restore_bytes) >
rates->individual.max_bytes)
class3->individual[mpos] = rates->individual.max_bytes;
mpos++;
- if (j == 255)
+ if (j == (IND_MAP_SZ - 1))
mpos -= 256;
- if (++j == 255)
+ if (++j == (IND_MAP_SZ - 1))
break;
}
}
(class3->network[i] += network_restore_bytes) >
rates->network.max_bytes)
class3->network[i] = rates->network.max_bytes;
- if (++i == 255)
+ if (++i == (NET_MAP_SZ - 1))
return;
}
}
/* must be a reference only - partially malloc()d struct */
delaySpecSet *rate = Config.Delay.rates[pool];
class2DelayPool *class2 = delay_data[pool].class2;
- unsigned char shown = 0, i;
+ unsigned char shown = 0;
+ unsigned int i;
storeAppendPrintf(sentry, "Pool: %d\n\tClass: 2\n\n", pool + 1);
delayPoolStatsAg(sentry, rate, class2->aggregate);
storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->individual.max_bytes);
storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->individual.restore_bps);
storeAppendPrintf(sentry, "\t\tCurrent: ");
- for (i = 0;; i++) {
+ for (i = 0; i < IND_MAP_SZ; i++) {
if (class2->individual_map[i] == 255)
break;
storeAppendPrintf(sentry, "%d:%d ", class2->individual_map[i],
/* fully malloc()d struct in this case only */
delaySpecSet *rate = Config.Delay.rates[pool];
class3DelayPool *class3 = delay_data[pool].class3;
- unsigned char shown = 0, i, j;
+ unsigned char shown = 0;
+ unsigned int i;
+ unsigned int j;
storeAppendPrintf(sentry, "Pool: %d\n\tClass: 3\n\n", pool + 1);
delayPoolStatsAg(sentry, rate, class3->aggregate);
storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->network.max_bytes);
storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->network.restore_bps);
storeAppendPrintf(sentry, "\t\tCurrent: ");
- for (i = 0;; i++) {
+ for (i = 0; i < NET_MAP_SZ; i++) {
if (class3->network_map[i] == 255)
break;
storeAppendPrintf(sentry, "%d:%d ", class3->network_map[i],
storeAppendPrintf(sentry, "\tIndividual:\n");
storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->individual.max_bytes);
storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->individual.restore_bps);
- for (i = 0;; i++) {
+ for (i = 0; i < NET_MAP_SZ; i++) {
if (class3->network_map[i] == 255)
break;
storeAppendPrintf(sentry, "\t\tCurrent [Network %d]: ", class3->network_map[i]);
shown = 1;
- for (j = 0;; j++) {
+ for (j = 0; j < IND_MAP_SZ; j++) {
if (class3->individual_map[i][j] == 255)
break;
storeAppendPrintf(sentry, "%d:%d ", class3->individual_map[i][j],
if (class3->network_255_used) {
storeAppendPrintf(sentry, "\t\tCurrent [Network 255]: ");
shown = 1;
- for (j = 0;; j++) {
+ for (j = 0; j < IND_MAP_SZ; j++) {
if (class3->individual_map[255][j] == 255)
break;
storeAppendPrintf(sentry, "%d:%d ", class3->individual_map[255][j],
/*
- * $Id: disk.cc,v 1.146 1999/05/26 17:07:57 wessels Exp $
+ * $Id: disk.cc,v 1.147 2000/03/06 16:23:30 wessels Exp $
*
* DEBUG: section 6 Disk I/O Routines
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: dns.cc,v 1.80 1999/12/30 17:36:30 wessels Exp $
+ * $Id: dns.cc,v 1.81 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 34 Dnsserver interface
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: dns_internal.cc,v 1.17 1999/10/04 19:10:52 wessels Exp $
+ * $Id: dns_internal.cc,v 1.18 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static OBJH idnsStats;
static void idnsAddNameserver(const char *buf);
static void idnsFreeNameservers(void);
+static void idnsParseNameservers(void);
static void idnsParseResolvConf(void);
static void idnsSendQuery(idns_query * q);
static int idnsFromKnownNameserver(struct sockaddr_in *from);
static void idnsGrokReply(const char *buf, size_t sz);
static PF idnsRead;
static EVH idnsCheckQueue;
+static void idnsTickleQueue(void);
static void
idnsAddNameserver(const char *buf)
nameservers[nns].S.sin_family = AF_INET;
nameservers[nns].S.sin_port = htons(DOMAIN_PORT);
nameservers[nns].S.sin_addr.s_addr = inet_addr(buf);
- debug(78, 1) ("idnsAddNameserver: Added nameserver #%d: %s\n",
+ debug(78, 3) ("idnsAddNameserver: Added nameserver #%d: %s\n",
nns, inet_ntoa(nameservers[nns].S.sin_addr));
nns++;
}
nns = nns_alloc = 0;
}
+static void
+idnsParseNameservers(void)
+{
+ wordlist *w;
+ for (w = Config.dns_nameservers; w; w = w->next) {
+ debug(78, 1) ("Adding nameserver %s from squid.conf\n", w->key);
+ idnsAddNameserver(w->key);
+ }
+}
+
static void
idnsParseResolvConf(void)
{
debug(78, 1) ("%s: %s\n", _PATH_RESOLV_CONF, xstrerror());
return;
}
- idnsFreeNameservers();
while (fgets(buf, 512, fp)) {
t = strtok(buf, w_space);
if (NULL == t)
t = strtok(NULL, w_space);
if (t == NULL)
continue;;
- debug(78, 1) ("idnsParseResolvConf: nameserver %s\n", t);
+ debug(78, 1) ("Adding nameserver %s from %s\n", t, _PATH_RESOLV_CONF);
idnsAddNameserver(t);
}
fclose(fp);
}
}
+static void
+idnsTickleQueue(void)
+{
+ if (event_queued)
+ return;
+ if (NULL == lru_list.tail)
+ return;
+ eventAdd("idnsCheckQueue", idnsCheckQueue, NULL, 1.0, 1);
+ event_queued = 1;
+}
+
static void
idnsSendQuery(idns_query * q)
{
q->sent_t = current_time;
nameservers[ns].nqueries++;
dlinkAdd(q, &q->lru, &lru_list);
- if (!event_queued) {
- eventAdd("idnsCheckQueue", idnsCheckQueue, NULL, 1.0, 1);
- event_queued = 1;
- }
+ idnsTickleQueue();
}
static int
memFree(q, MEM_IDNS_QUERY);
}
}
+ idnsTickleQueue();
}
/* ====================================================================== */
fatal("Could not create a DNS socket");
debug(78, 1) ("DNS Socket created on FD %d\n", DnsSocket);
}
- if (nns == 0)
+ assert(0 == nns);
+ idnsParseNameservers();
+ if (0 == nns)
idnsParseResolvConf();
if (!init) {
memDataInit(MEM_IDNS_QUERY, "idns_query", sizeof(idns_query), 0);
return;
comm_close(DnsSocket);
DnsSocket = -1;
+ idnsFreeNameservers();
}
void
/*
- * $Id: dnsserver.cc,v 1.56 1999/01/13 23:24:12 wessels Exp $
+ * $Id: dnsserver.cc,v 1.57 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 0 DNS Resolver
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: enums.h,v 1.162 1999/12/30 17:36:31 wessels Exp $
+ * $Id: enums.h,v 1.163 2000/03/06 16:23:31 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
LOG_TCP_MEM_HIT,
LOG_TCP_DENIED,
LOG_TCP_OFFLINE_HIT,
+#if LOG_TCP_REDIRECTS
+ LOG_TCP_REDIRECT,
+#endif
LOG_UDP_HIT,
LOG_UDP_MISS,
LOG_UDP_DENIED,
HDR_CONTENT_MD5,
HDR_CONTENT_RANGE,
HDR_CONTENT_TYPE,
+ HDR_COOKIE,
HDR_DATE,
HDR_ETAG,
HDR_EXPIRES,
/*
- * $Id: errorpage.cc,v 1.152 1999/10/04 05:05:10 wessels Exp $
+ * $Id: errorpage.cc,v 1.153 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 4 Error Generation
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: event.cc,v 1.28 1999/04/19 04:49:12 wessels Exp $
+ * $Id: event.cc,v 1.29 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 41 Event Processing
* AUTHOR: Henrik Nordstrom
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: fd.cc,v 1.37 1999/05/03 21:55:02 wessels Exp $
+ * $Id: fd.cc,v 1.38 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 51 Filedescriptor Functions
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: filemap.cc,v 1.33 2000/01/11 04:57:15 wessels Exp $
+ * $Id: filemap.cc,v 1.34 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 8 Swap File Bitmap
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: forward.cc,v 1.68 2000/01/11 04:58:03 wessels Exp $
+ * $Id: forward.cc,v 1.69 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
return 0;
if (fwdState->n_tries > 10)
return 0;
- if (squid_curtime - fwdState->start > 120)
+ if (squid_curtime - fwdState->start > Config.Timeout.connect)
return 0;
if (fwdState->flags.dont_retry)
return 0;
err->request = requestLink(fwdState->request);
err->xerrno = ETIMEDOUT;
fwdFail(fwdState, err);
+ /*
+ * This marks the peer DOWN ...
+ */
+ if (fwdState->servers)
+ if (fwdState->servers->peer)
+ peerCheckConnectStart(fwdState->servers->peer);
}
comm_close(fd);
}
/*
- * $Id: fqdncache.cc,v 1.131 1999/06/17 22:20:39 wessels Exp $
+ * $Id: fqdncache.cc,v 1.132 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: ftp.cc,v 1.288 1999/12/30 17:36:33 wessels Exp $
+ * $Id: ftp.cc,v 1.289 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
ct = buf + 1;
p->type = 0;
while (ct && *ct) {
+ long lt;
+ time_t t;
switch (*ct) {
case '\t':
sscanf(ct + 1, "%[^,]", sbuf);
sscanf(ct + 1, "%d", &(p->size));
break;
case 'm':
- sscanf(ct + 1, "%d", &i);
- p->date = xstrdup(ctime((time_t *) & i));
+ if (1 != sscanf(ct + 1, "%ld", <))
+ break;
+ t = lt;
+ p->date = xstrdup(ctime(&t));
*(strstr(p->date, "\n")) = '\0';
break;
case '/':
/*
- * $Id: globals.h,v 1.86 1999/12/30 17:36:35 wessels Exp $
+ * $Id: globals.h,v 1.87 2000/03/06 16:23:31 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: gopher.cc,v 1.151 1999/10/04 05:05:13 wessels Exp $
+ * $Id: gopher.cc,v 1.152 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: htcp.cc,v 1.29 1999/12/30 17:36:35 wessels Exp $
+ * $Id: htcp.cc,v 1.30 2000/03/06 16:23:31 wessels Exp $
*
* DEBUG: section 31 Hypertext Caching Protocol
* AUTHOR: Duane Wesssels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
debug(31, 3) ("htcpHandle: htcpHdr.major = %d\n", (int) htcpHdr.major);
debug(31, 3) ("htcpHandle: htcpHdr.minor = %d\n", (int) htcpHdr.minor);
if (sz != htcpHdr.length) {
- debug(31, 0) ("htcpHandle: sz != htcpHdr.length\n");
+ debug(31, 1) ("htcpHandle: sz != htcpHdr.length\n");
return;
}
buf += sizeof(htcpHeader);
/*
- * $Id: http.cc,v 1.355 1999/12/30 17:36:36 wessels Exp $
+ * $Id: http.cc,v 1.356 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
* Is keep-alive okay for all request methods?
*/
- if (p == NULL)
+ if (!Config.onoff.server_pconns)
+ httpState->flags.keepalive = 0;
+ else if (p == NULL)
httpState->flags.keepalive = 1;
else if (p->stats.n_keepalives_sent < 10)
httpState->flags.keepalive = 1;
/*
- * $Id: icmp.cc,v 1.69 1998/12/05 00:54:29 wessels Exp $
+ * $Id: icmp.cc,v 1.70 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 37 ICMP Routines
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: icp_v2.cc,v 1.61 1999/12/30 17:36:37 wessels Exp $
+ * $Id: icp_v2.cc,v 1.62 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 12 Internet Cache Protocol
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: icp_v3.cc,v 1.30 1999/06/14 03:02:07 wessels Exp $
+ * $Id: icp_v3.cc,v 1.31 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 12 Internet Cache Protocol
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: ident.cc,v 1.50 1999/04/15 06:15:59 wessels Exp $
+ * $Id: ident.cc,v 1.51 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 30 Ident (RFC 931)
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: internal.cc,v 1.17 1999/12/30 17:36:38 wessels Exp $
+ * $Id: internal.cc,v 1.18 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 76 Internal Squid Object handling
* AUTHOR: Duane, Alex, Henrik
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: ipc.cc,v 1.17 1999/12/30 17:36:39 wessels Exp $
+ * $Id: ipc.cc,v 1.18 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 54 Interprocess Communication
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: ipcache.cc,v 1.218 1999/12/30 17:36:40 wessels Exp $
+ * $Id: ipcache.cc,v 1.219 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: leakfinder.cc,v 1.2 2000/01/05 06:23:44 wessels Exp $
+ * $Id: leakfinder.cc,v 1.3 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 45 Callback Data Registry
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: main.cc,v 1.307 1999/12/30 17:36:41 wessels Exp $
+ * $Id: main.cc,v 1.308 2000/03/06 16:23:32 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#endif
static EVH SquidShutdown;
static void mainSetCwd(void);
+static int checkRunningPid(void);
static const char *squid_start_script = "squid_start";
static void
mainInitialize(void)
{
+ /* chroot if configured to run inside chroot */
+ if (Config.chroot_dir && chroot(Config.chroot_dir)) {
+ fatal("failed to chroot");
+ }
if (opt_catch_signals) {
squid_signal(SIGSEGV, death, SA_NODEFER | SA_RESETHAND);
squid_signal(SIGBUS, death, SA_NODEFER | SA_RESETHAND);
else
debug(1, 1) ("ICP port disabled in httpd_accelerator mode\n");
}
+ if (Config.chroot_dir)
+ no_suid();
if (!configured_once)
writePidFile(); /* write PID file */
if (opt_parse_cfg_only)
return parse_err;
}
+ if (-1 == opt_send_signal)
+ if (checkRunningPid())
+ exit(1);
#if TEST_ACCESS
comm_init();
/* send signal to running copy and exit */
if (opt_send_signal != -1) {
+ /* chroot if configured to run inside chroot */
+ if (Config.chroot_dir && chroot(Config.chroot_dir)) {
+ fatal("failed to chroot");
+ }
sendSignal();
/* NOTREACHED */
}
if (opt_create_swap_dirs) {
+ /* chroot if configured to run inside chroot */
+ if (Config.chroot_dir && chroot(Config.chroot_dir)) {
+ fatal("failed to chroot");
+ }
setEffectiveUser();
debug(0, 0) ("Creating Swap Directories\n");
storeCreateSwapDirectories();
}
}
+static int
+checkRunningPid(void)
+{
+ pid_t pid;
+ debug_log = stderr;
+ pid = readPidFile();
+ if (pid < 2)
+ return 0;
+ if (kill(pid, 0) < 0)
+ return 0;
+ debug(0, 0) ("Squid is already running! Process ID %d\n", pid);
+ return 1;
+}
+
static void
watch_child(char *argv[])
{
exit(0);
if (setsid() < 0)
syslog(LOG_ALERT, "setsid failed: %s", xstrerror());
+ closelog();
#ifdef TIOCNOTTY
if ((i = open("/dev/tty", O_RDWR)) >= 0) {
ioctl(i, TIOCNOTTY, NULL);
mainStartScript(argv[0]);
if ((pid = fork()) == 0) {
/* child */
+ openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
prog = xstrdup(argv[0]);
argv[0] = xstrdup("(squid)");
execvp(prog, argv);
syslog(LOG_ALERT, "execvp failed: %s", xstrerror());
}
/* parent */
+ openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
syslog(LOG_NOTICE, "Squid Parent: child process %d started", pid);
time(&start);
squid_signal(SIGINT, SIG_IGN, SA_RESTART);
/*
- * $Id: mem.cc,v 1.42 1999/05/03 21:55:02 wessels Exp $
+ * $Id: mem.cc,v 1.43 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 13 High Level Memory Pool Management
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: mime.cc,v 1.92 1999/07/05 21:40:08 wessels Exp $
+ * $Id: mime.cc,v 1.93 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: multicast.cc,v 1.7 1998/07/22 20:37:36 wessels Exp $
+ * $Id: multicast.cc,v 1.8 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 7 Multicast
* AUTHOR: Martin Hamilton
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: neighbors.cc,v 1.277 1999/12/30 17:36:43 wessels Exp $
+ * $Id: neighbors.cc,v 1.278 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: net_db.cc,v 1.141 1999/12/30 17:36:44 wessels Exp $
+ * $Id: net_db.cc,v 1.142 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 38 Network Measurement Database
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: pconn.cc,v 1.25 1999/01/14 23:15:43 wessels Exp $
+ * $Id: pconn.cc,v 1.26 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 48 Persistent Connections
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: peer_digest.cc,v 1.72 1999/12/30 17:36:45 wessels Exp $
+ * $Id: peer_digest.cc,v 1.73 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 72 Peer Digest Routines
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: peer_select.cc,v 1.104 2000/01/05 23:32:20 wessels Exp $
+ * $Id: peer_select.cc,v 1.105 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 44 Peer Selection Algorithm
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: pinger.cc,v 1.42 1999/05/04 21:58:30 wessels Exp $
+ * $Id: pinger.cc,v 1.43 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 42 ICMP Pinger program
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: protos.h,v 1.354 2000/01/14 08:37:07 wessels Exp $
+ * $Id: protos.h,v 1.355 2000/03/06 16:23:33 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
extern void httpHeaderDestroyFieldsInfo(HttpHeaderFieldInfo * info, int count);
extern int httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * attrs, int end);
extern int httpHeaderIdByNameDef(const char *name, int name_len);
+extern const char *httpHeaderNameById(int id);
extern void httpHeaderMaskInit(HttpHeaderMask * mask, int value);
extern void httpHeaderCalcMask(HttpHeaderMask * mask, const int *enums, int count);
extern int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
/*
- * $Id: recv-announce.cc,v 1.20 1998/07/22 20:37:43 wessels Exp $
+ * $Id: recv-announce.cc,v 1.21 2000/03/06 16:23:33 wessels Exp $
*
* DEBUG: section 0 Announcement Server
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: redirect.cc,v 1.83 1999/12/30 17:36:48 wessels Exp $
+ * $Id: redirect.cc,v 1.84 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 29 Redirector
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
memset(&ch, '\0', sizeof(ch));
ch.src_addr = http->conn->peer.sin_addr;
ch.my_addr = http->conn->me.sin_addr;
+ ch.my_port = ntohs(http->conn->me.sin_port);
ch.request = http->request;
if (!aclCheckFast(Config.accessList.redirector, &ch)) {
/* denied -- bypass redirector */
/*
- * $Id: refresh.cc,v 1.50 1999/10/04 05:05:24 wessels Exp $
+ * $Id: refresh.cc,v 1.51 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 22 Refresh Calculation
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: send-announce.cc,v 1.57 1999/12/30 17:36:49 wessels Exp $
+ * $Id: send-announce.cc,v 1.58 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 27 Cache Announcer
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: snmp_agent.cc,v 1.72 1999/10/04 05:05:25 wessels Exp $
+ * $Id: snmp_agent.cc,v 1.73 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 49 SNMP Interface
* AUTHOR: Kostas Anagnostakis
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: snmp_core.cc,v 1.40 1999/10/04 05:05:26 wessels Exp $
+ * $Id: snmp_core.cc,v 1.41 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 49 SNMP support
* AUTHOR: Glenn Chisholm
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: squid.h,v 1.198 2000/01/05 06:23:46 wessels Exp $
+ * $Id: squid.h,v 1.199 2000/03/06 16:23:34 wessels Exp $
*
* AUTHOR: Duane Wessels
*
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: ssl.cc,v 1.101 1999/12/30 17:36:51 wessels Exp $
+ * $Id: ssl.cc,v 1.102 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: stat.cc,v 1.323 2000/01/05 22:44:02 wessels Exp $
+ * $Id: stat.cc,v 1.324 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: stmem.cc,v 1.64 1998/12/05 00:54:42 wessels Exp $
+ * $Id: stmem.cc,v 1.65 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 19 Store Memory Primitives
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: store.cc,v 1.514 2000/02/01 05:43:02 wessels Exp $
+ * $Id: store.cc,v 1.515 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{
const HttpReply *reply = entry->mem_obj->reply;
time_t served_date = reply->date;
+ int age = httpHeaderGetInt(&reply->header, HDR_AGE);
+ /*
+ * The timestamp calculations below tries to mimic the properties
+ * of the age calculation in RFC2616 section 13.2.3. The implementaion
+ * isn't complete, and the most notable exception from the RFC is that
+ * this does not account for response_delay, but it probably does
+ * not matter much as this is calculated immediately when the headers
+ * are received, not when the whole response has been received.
+ */
/* make sure that 0 <= served_date <= squid_curtime */
if (served_date < 0 || served_date > squid_curtime)
served_date = squid_curtime;
+ /*
+ * Compensate with Age header if origin server clock is ahead of us
+ * and there is a cache in between us and the origin server
+ */
+ if (age > squid_curtime - served_date)
+ served_date = squid_curtime - age;
entry->expires = reply->expires;
entry->lastmod = reply->last_modified;
entry->timestamp = served_date;
/*
- * $Id: store_client.cc,v 1.83 2000/01/14 18:33:40 wessels Exp $
+ * $Id: store_client.cc,v 1.84 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 20 Storage Manager Client-Side Interface
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
tlv_list = storeSwapMetaUnpack(buf, &swap_hdr_sz);
if (swap_hdr_sz > len) {
/* oops, bad disk file? */
- debug(20, 1) ("storeClientReadHeader: header too small\n");
+ debug(20, 1) ("WARNING: swapfile header too small\n");
storeClientCallback(sc, -1);
return;
}
if (tlv_list == NULL) {
- debug(20, 1) ("storeClientReadHeader: failed to unpack meta data\n");
+ debug(20, 1) ("WRNING: failed to unpack meta data\n");
storeClientCallback(sc, -1);
return;
}
/*
- * $Id: store_digest.cc,v 1.37 2000/01/14 07:24:48 wessels Exp $
+ * $Id: store_digest.cc,v 1.38 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 71 Store Digest Manager
* AUTHOR: Alex Rousskov
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: store_dir.cc,v 1.104 2000/01/14 07:14:12 wessels Exp $
+ * $Id: store_dir.cc,v 1.105 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: store_key_md5.cc,v 1.22 1999/12/11 15:57:42 wessels Exp $
+ * $Id: store_key_md5.cc,v 1.23 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 20 Storage Manager MD5 Cache Keys
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: store_log.cc,v 1.9 1999/10/04 05:05:34 wessels Exp $
+ * $Id: store_log.cc,v 1.10 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 20 Storage Manager Logging Functions
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: store_rebuild.cc,v 1.68 2000/02/01 05:45:33 wessels Exp $
+ * $Id: store_rebuild.cc,v 1.69 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 20 Store Rebuild Routines
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: store_swapin.cc,v 1.21 1999/10/04 05:05:34 wessels Exp $
+ * $Id: store_swapin.cc,v 1.22 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 20 Storage Manager Swapin Functions
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: store_swapmeta.cc,v 1.9 2000/01/03 19:33:14 wessels Exp $
+ * $Id: store_swapmeta.cc,v 1.10 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 20 Storage Manager Swapfile Metadata
* AUTHOR: Kostas Anagnostakis
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: store_swapout.cc,v 1.61 2000/02/01 05:52:15 wessels Exp $
+ * $Id: store_swapout.cc,v 1.62 2000/03/06 16:23:35 wessels Exp $
*
* DEBUG: section 20 Storage Manager Swapout Functions
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: structs.h,v 1.312 2000/01/14 08:37:08 wessels Exp $
+ * $Id: structs.h,v 1.313 2000/03/06 16:23:36 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
char *effectiveUser;
char *effectiveGroup;
struct {
+#if USE_DNSSERVER
char *dnsserver;
+#endif
wordlist *redirect;
wordlist *authenticate;
char *pinger;
char *unlinkd;
} Program;
+#if USE_DNSSERVER
int dnsChildren;
+#endif
int redirectChildren;
int authenticateChildren;
int authenticateTTL;
} Netdb;
struct {
int log_udp;
+#if USE_DNSSERVER
int res_defnames;
+#endif
int anonymizer;
int client_db;
int query_icmp;
int strip_query_terms;
int redirector_bypass;
int ignore_unknown_nameservers;
+ int client_pconns;
+ int server_pconns;
#if USE_CACHE_DIGESTS
int digest_generation;
#endif
#endif
HttpHeaderMask anonymize_headers;
char *coredump_dir;
+ char *chroot_dir;
#if USE_CACHE_DIGESTS
struct {
int bits_per_entry;
- int rebuild_period;
- int rewrite_period;
- int swapout_chunk_size;
+ time_t rebuild_period;
+ time_t rewrite_period;
+ size_t swapout_chunk_size;
int rebuild_chunk_percentage;
} digest;
#endif
/*
- * $Id: test_cache_digest.cc,v 1.23 1998/07/22 20:38:01 wessels Exp $
+ * $Id: test_cache_digest.cc,v 1.24 2000/03/06 16:23:36 wessels Exp $
*
* AUTHOR: Alex Rousskov
*
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: tools.cc,v 1.188 1999/12/30 17:37:01 wessels Exp $
+ * $Id: tools.cc,v 1.189 2000/03/06 16:23:36 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{
struct passwd *pwd = NULL;
struct group *grp = NULL;
+ gid_t gid;
debug(21, 3) ("leave_suid: PID %d called\n", getpid());
if (geteuid() != 0)
return;
if ((pwd = getpwnam(Config.effectiveUser)) == NULL)
return;
if (Config.effectiveGroup && (grp = getgrnam(Config.effectiveGroup))) {
- if (setgid(grp->gr_gid) < 0)
- debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror());
+ gid = grp->gr_gid;
} else {
- if (setgid(pwd->pw_gid) < 0)
- debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror());
+ gid = pwd->pw_gid;
}
+#if HAVE_SETGROUPS
+ setgroups(1, &gid);
+#endif
+ if (setgid(gid) < 0)
+ debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror());
debug(21, 3) ("leave_suid: PID %d giving up root, becoming '%s'\n",
getpid(), pwd->pw_name);
#if HAVE_SETRESUID
/*
- * $Id: tunnel.cc,v 1.101 1999/12/30 17:36:51 wessels Exp $
+ * $Id: tunnel.cc,v 1.102 2000/03/06 16:23:34 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: typedefs.h,v 1.99 1999/12/30 17:37:02 wessels Exp $
+ * $Id: typedefs.h,v 1.100 2000/03/06 16:23:36 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: unlinkd.cc,v 1.33 1999/12/30 17:37:03 wessels Exp $
+ * $Id: unlinkd.cc,v 1.34 2000/03/06 16:23:36 wessels Exp $
*
* DEBUG: section 12 Unlink Daemon
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: url.cc,v 1.120 1999/12/30 17:37:03 wessels Exp $
+ * $Id: url.cc,v 1.121 2000/03/06 16:23:36 wessels Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
*
- * $Id: urn.cc,v 1.57 1999/12/30 17:37:04 wessels Exp $
+ * $Id: urn.cc,v 1.58 2000/03/06 16:23:36 wessels Exp $
*
* DEBUG: section 52 URN Parsing
* AUTHOR: Kostas Anagnostakis
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: useragent.cc,v 1.18 1999/08/02 06:18:50 wessels Exp $
+ * $Id: useragent.cc,v 1.19 2000/03/06 16:23:36 wessels Exp $
*
* DEBUG: section 40 User-Agent logging
* AUTHOR: Joe Ramey <ramey@csc.ti.com>
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: wais.cc,v 1.131 1999/01/24 02:26:26 wessels Exp $
+ * $Id: wais.cc,v 1.132 2000/03/06 16:23:36 wessels Exp $
*
* DEBUG: section 24 WAIS Relay
* AUTHOR: Harvest Derived
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * $Id: wccp.cc,v 1.13 2000/01/14 07:13:16 wessels Exp $
+ * $Id: wccp.cc,v 1.14 2000/03/06 16:23:36 wessels Exp $
*
* DEBUG: section 80 WCCP Support
* AUTHOR: Glenn Chisholm
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
wccp_here_i_am.id = wccp_i_see_you.id;
send(theOutWccpConnection,
- (void *) &wccp_here_i_am,
+ &wccp_here_i_am,
sizeof(wccp_here_i_am),
0);
/*
- * $Id: whois.cc,v 1.9 1999/01/15 06:11:47 wessels Exp $
+ * $Id: whois.cc,v 1.10 2000/03/06 16:23:36 wessels Exp $
*
* DEBUG: section 75 WHOIS protocol
* AUTHOR: Duane Wessels, Kostas Anagnostakis
* Internet community. Development is led by Duane Wessels of the
* National Laboratory for Applied Network Research and funded by the
* National Science Foundation. Squid is Copyrighted (C) 1998 by
- * Duane Wessels and the University of California San Diego. Please
- * see the COPYRIGHT file for full details. Squid incorporates
- * software developed and/or copyrighted by other sources. Please see
- * the CREDITS file for full details.
+ * the Regents of the University of California. Please see the
+ * COPYRIGHT file for full details. Squid incorporates software
+ * developed and/or copyrighted by other sources. Please see the
+ * CREDITS file for full details.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by