]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merge changes from 2.3 branch. Mostly this is copyright text changes.
authorwessels <>
Mon, 6 Mar 2000 23:23:27 +0000 (23:23 +0000)
committerwessels <>
Mon, 6 Mar 2000 23:23:27 +0000 (23:23 +0000)
104 files changed:
src/CacheDigest.cc
src/ETag.cc
src/HttpBody.cc
src/HttpHdrCc.cc
src/HttpHdrContRange.cc
src/HttpHdrExtField.cc
src/HttpHdrRange.cc
src/HttpHeader.cc
src/HttpHeaderTools.cc
src/HttpMsg.cc
src/HttpReply.cc
src/HttpRequest.cc
src/HttpStatusLine.cc
src/MemBuf.cc
src/Packer.cc
src/StatHist.cc
src/String.cc
src/access_log.cc
src/acl.cc
src/asn.cc
src/authenticate.cc
src/cache_cf.cc
src/cache_diff.cc
src/cache_manager.cc
src/cachemgr.cc
src/carp.cc
src/cbdata.cc
src/cf.data.pre
src/cf_gen.cc
src/client.cc
src/client_db.cc
src/client_side.cc
src/comm.cc
src/comm_select.cc
src/debug.cc
src/defines.h
src/delay_pools.cc
src/disk.cc
src/dns.cc
src/dns_internal.cc
src/dnsserver.cc
src/enums.h
src/errorpage.cc
src/event.cc
src/fd.cc
src/filemap.cc
src/forward.cc
src/fqdncache.cc
src/ftp.cc
src/globals.h
src/gopher.cc
src/htcp.cc
src/http.cc
src/icmp.cc
src/icp_v2.cc
src/icp_v3.cc
src/ident.cc
src/internal.cc
src/ipc.cc
src/ipcache.cc
src/leakfinder.cc
src/main.cc
src/mem.cc
src/mime.cc
src/multicast.cc
src/neighbors.cc
src/net_db.cc
src/pconn.cc
src/peer_digest.cc
src/peer_select.cc
src/pinger.cc
src/protos.h
src/recv-announce.cc
src/redirect.cc
src/refresh.cc
src/send-announce.cc
src/snmp_agent.cc
src/snmp_core.cc
src/squid.h
src/ssl.cc
src/stat.cc
src/stmem.cc
src/store.cc
src/store_client.cc
src/store_digest.cc
src/store_dir.cc
src/store_key_md5.cc
src/store_log.cc
src/store_rebuild.cc
src/store_swapin.cc
src/store_swapmeta.cc
src/store_swapout.cc
src/structs.h
src/test_cache_digest.cc
src/tools.cc
src/tunnel.cc
src/typedefs.h
src/unlinkd.cc
src/url.cc
src/urn.cc
src/useragent.cc
src/wais.cc
src/wccp.cc
src/whois.cc

index c2996836b76034985ef300e655ea3cc1aee0ecef..780f531ee7b0e6187572e90159e5f8a7620bc15f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 2271aa14d885d0d4d02ba0650f75b45131dd312b..686ffb63cb69e79947c1307129667634492d93e5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index e3b6c1ecb5f85033988a17265d74e8df054b7fa5..dcbce0b7f0053f27079f10a986fcf33b49a99d99 100644 (file)
@@ -2,7 +2,7 @@
 
 
 /*
- * $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
index a09e2d4f0152e194bb0aca86a754a7e26f612c02..80e7d99383ed233f4a078573e8154c8b197dbf9c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 4a0b1ef539c956a05f5d393b7f3fa38606316124..4c4b990b55c6d4743a42b48212c921e9147705cc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 52b959536cc1b043d2ed25417e8d2d1fb2997afc..0b0dd4eb7f59c1faeebd6ba0719597350013a57b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 7c173230dbbdf081fc423fd2c54faf9f8b80a5aa..cde1e1cb7a687acab8fde434d84b586e22da5efb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 6485262005249644853694b95293e7655258ff31..82867f8b6b3dd5088d66c1538d2b433108e3feac 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -84,6 +84,7 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] =
     {"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},
@@ -1094,3 +1095,12 @@ httpHeaderIdByNameDef(const char *name, int name_len)
        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;
+}
index 926f50746eb25be0561e2fe4394fd342cbd0e76c..f631ec8d58e017ecbdd183c1ca0fd42c113c7625 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 06d35a35206274c56321f0a50fd9a03d52dd7dbb..d7e4f4585f48d0b353907f131836aec8fe4989e8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 95bdcf255499c215a22873f39492381bfa09e801..89b2c30c009576e5ef043720df3d28ccc78a4788 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index d8f501118e7c91dfceefd7af6951f0123c1dee21..b093cfe25eba6f3a865f4273a17da14ac8de2d4c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index f3af87fb2df74d08da9743a14a519b0c2fb867b8..6775b5dacf1d20ea45757129a2e6736a491cfbbd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 95c990353d40624b7c0497f46d3f48d494ed613a..2c2d8814314cc9ea9b58d32d99d577a61bb79d0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
index 9621f11bc7dfba27f9afb6de4c54332c44ec44b7..05afc23a7cc8182c6de6328cf88bc78c2f7e7e3e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 9fc1f1dc47deaef3bf0813a1ea05c0b5c0f87830..22e92fb4c680b6de37ae1daeddba6b14ff4941bb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index ebd9c98248e7d5ab5bafce65064f0c04ca935b01..d7042a601035e8ea1076e170920652e4f45f3b95 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 50cdd40a178eed72f0cff173742681db7eb21ffd..3950b7d27919c77b83cc6e3a955cd8a593b07b07 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $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
@@ -63,6 +63,9 @@ const char *log_tags[] =
     "TCP_MEM_HIT",
     "TCP_DENIED",
     "TCP_OFFLINE_HIT",
+#if LOG_TCP_REDIRECTS
+    "TCP_REDIRECT",
+#endif
     "UDP_HIT",
     "UDP_MISS",
     "UDP_DENIED",
@@ -234,8 +237,21 @@ accessLogOpen(const char *fname)
     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;
 }
index fa00c04923f1f93f9d087c78f7210335960befba..6b70f010d83456c141dfc3e7c8de0ccc43e656c4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -1372,7 +1372,7 @@ aclMatchAcl(acl * ae, aclCheck_t * checklist)
        /* 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);
@@ -2264,7 +2264,9 @@ aclPurgeMethodInUse(acl_access * a)
 #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
index 07780045e2afcc8436d5d9fe46d6b86ffcee298b..6129b7dfdcef1732374b5886049b28d1b02cef55 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
index 6bedd785c6f2f6b5be49f3004cd4e615ab1c6ac3..8564e84ff04e3c98a2e9cdb9c09ff7d1632219a8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index f459e81697332c45d0692dde754b93c767253c96..1b2612066c0188d5808146fdf52803ac0d2ba83a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -55,8 +55,8 @@ static const char *const B_MBYTES_STR = "MB";
 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 **);
@@ -188,6 +188,7 @@ parseConfigFile(const char *file_name)
        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')))
@@ -236,6 +237,7 @@ configDoConfigure(void)
        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) {
@@ -245,6 +247,7 @@ configDoConfigure(void)
            DefaultDnsChildrenMax);
        Config.dnsChildren = DefaultDnsChildrenMax;
     }
+#endif
     if (Config.Program.redirect) {
        if (Config.redirectChildren < 1) {
            Config.redirectChildren = 0;
@@ -319,7 +322,9 @@ configDoConfigure(void)
     }
 #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);
@@ -711,7 +716,13 @@ parse_delay_pool_access(delayConfig * cfg)
 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
@@ -719,7 +730,6 @@ parse_http_header(HttpHeaderMask * header)
 {
     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);
@@ -736,16 +746,20 @@ parse_http_header(HttpHeaderMask * header)
        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);
@@ -1276,7 +1290,6 @@ parse_onoff(int *var)
 }
 
 #define free_onoff free_int
-#define free_httpanonymizer free_int
 #define dump_eol dump_string
 #define free_eol free_string
 
@@ -1629,30 +1642,32 @@ parse_sockaddr_in_list(sockaddr_in_list ** head)
 {
     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();
index 32a2a1b17b1b13e3af286f7e73737acf786bd811..b55635ae00da2d2ea8398a6e475f476726f72252 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
index c0690ba6001e7c2acaecf3b073fb20dbe09a0671..ad9aa399a0af452e72e5f30f11fa61558bbb8a27 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 1fca83c74ec00f4a5d149c584ceb7f33f59fe892..9adf15c4a0f9562b6d2c907978fc891443db13eb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index a92bf53445b45b09a20094cd3fac8dfb447d2fa9..ab3d9f700a0e58d5139b633c7bb1f42023e8bf8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
@@ -97,6 +97,10 @@ carpSelectParent(request_t * request)
        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;
index ec8d743c53f3947598a7d7862895dc2cdb3d8370..c0bf617fc7962574b3ebc1ff74210b2ceacbff8f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 0a3985179c7e4b8d2cddd95719344d566590daea..a04113d0d8a60086a82b88cc8e0ccf64d50a94f4 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $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
@@ -42,7 +42,7 @@ COMMENT_START
        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.
 
@@ -74,13 +74,15 @@ DOC_START
 
        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
 
@@ -130,10 +132,7 @@ DOC_START
        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/).
@@ -173,7 +172,7 @@ DOC_START
        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
@@ -375,12 +374,15 @@ DEFAULT: 2000
 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
@@ -613,8 +615,11 @@ DOC_START
        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
@@ -658,7 +663,7 @@ DEFAULT: @DEFAULT_CACHE_LOG@
 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@
@@ -673,7 +678,7 @@ DOC_START
        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@
@@ -722,7 +727,7 @@ DOC_START
        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
@@ -840,7 +845,7 @@ LOC: Config.Ftp.anon_user
 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,
@@ -865,6 +870,7 @@ DOC_END
 
 NAME: cache_dns_program
 TYPE: string
+IFDEF: USE_DNSSERVER
 DEFAULT: @DEFAULT_DNSSERVER@
 LOC: Config.Program.dnsserver
 DOC_START
@@ -875,6 +881,7 @@ DOC_END
 
 NAME: dns_children
 TYPE: int
+IFDEF: USE_DNSSERVER
 DEFAULT: 5
 LOC: Config.dnsChildren
 DOC_START
@@ -883,9 +890,7 @@ 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
@@ -893,6 +898,7 @@ DOC_END
 
 NAME: dns_defnames
 COMMENT: on|off
+IFDEF: USE_DNSSERVER
 TYPE: onoff
 DEFAULT: off
 LOC: Config.onoff.res_defnames
@@ -940,7 +946,7 @@ DEFAULT: @DEFAULT_PINGER@
 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@
@@ -1127,14 +1133,24 @@ TYPE: b_size_t
 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
 
@@ -1152,11 +1168,11 @@ DOC_START
        '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
@@ -1245,7 +1261,7 @@ DOC_START
        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
@@ -1474,7 +1490,7 @@ DEFAULT: 1 day
 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
@@ -1581,8 +1597,8 @@ DOC_START
        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
@@ -1887,7 +1903,7 @@ COMMENT_START
        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
@@ -2499,7 +2515,7 @@ DOC_START
        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
@@ -2512,7 +2528,7 @@ DOC_START
                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
@@ -2557,8 +2573,8 @@ LOC: Config.errorDirectory
 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
 
@@ -2632,7 +2648,7 @@ DOC_START
        snmp_access allow|deny [!]aclname ...
 
 Example:
-snmp_access allow snmpppublic localhost
+snmp_access allow snmppublic localhost
 snmp_access deny all
 DOC_END
 
@@ -2655,7 +2671,7 @@ DOC_START
        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.
@@ -2680,10 +2696,10 @@ LOC: Config.Wccp.router
 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
@@ -2698,14 +2714,21 @@ LOC: Config.Wccp.outgoing
 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.
@@ -2778,7 +2801,7 @@ IFDEF: DELAY_POOLS
 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
@@ -2993,7 +3016,7 @@ TYPE: ushort
 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
 
@@ -3081,7 +3104,6 @@ DOC_START
        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
 
@@ -3094,61 +3116,89 @@ DOC_START
        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
 
index 4fe6633c238a7d3a2eb81baaf2710dce4d03588b..31dae4af193dc3199a34249f6b980ec4b1afa025 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
index 5ee167830d46afbf8c380acc7eefc93bb36cc2c6..b2f7368e5f35338b7421aec63e22040151feff83 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 358a7a57d23244778d4db4ef3e1c7e6062d9438b..c0409fe317831e37e999c9b8fa39505175ae9325 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 57436b6acabe0f302d2e3ebefaaecd1d01bcce54..3dd0d73ea5ff4dcd7504ac8fbdd40a519a1de355 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -105,6 +105,7 @@ static int clientCheckContentLength(request_t * r);
 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)
@@ -140,7 +141,7 @@ clientAccessCheck(void *data)
     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,
@@ -851,11 +852,9 @@ clientSetKeepaliveFlag(clientHttpRequest * 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;
 }
 
@@ -1168,20 +1167,29 @@ clientBuildReplyHeader(clientHttpRequest * http, HttpReply * rep)
     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",
@@ -1569,6 +1577,18 @@ clientReplyBodyTooLarge(int clen)
     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
@@ -1773,7 +1793,7 @@ clientWriteComplete(int fd, char *bufnotused, size_t size, int errflag, void *da
     } 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) {
@@ -2010,6 +2030,9 @@ clientProcessMiss(clientHttpRequest * http)
     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);
@@ -2479,7 +2502,7 @@ clientReadRequest(int fd, void *data)
                    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,
@@ -2498,11 +2521,6 @@ clientReadRequest(int fd, void *data)
            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);
@@ -2709,7 +2727,7 @@ clientCheckTransferDone(clientHttpRequest * http)
 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)
index 87a1b9da35603b81a55a5d11b02d2c65ecba64ee..1168e198143352ef815e6b4c0adbba89ac6ca784 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 20e13595d8cb4a05c6ff3ac657edac3cd9c0f4c6..dcaeb0c714e67360dd398908fc7fbb9e762f02a1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 5ce1ab87f858b710e8e1eb7157a1b17606e1af25..18269c00347180d188d5d7266b936e1e1b10c9b7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 987975e85a95d7e0bfd5425d5fc8727ffb96765f..9990caa3e3d9d1e0a0bb88c1414ae56ad0ce5efb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index ced7ac61442bb041b4a00c6e619c59cce8912a21..eadb75695ef8d3800c73547bb7be164a6480272c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -42,30 +42,35 @@ struct _class1DelayPool {
     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;
@@ -301,17 +306,18 @@ delayClient(request_t * r)
        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 *
@@ -334,12 +340,13 @@ delayClient(request_t * r)
                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 *
@@ -353,21 +360,26 @@ delayClient(request_t * r)
        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;
@@ -392,7 +404,7 @@ static void
 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.
      */
@@ -408,12 +420,13 @@ delayUpdateClass2(class2DelayPool * class2, delaySpecSet * rates, int incr)
     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;
     }
 }
@@ -423,7 +436,7 @@ delayUpdateClass3(class3DelayPool * class3, delaySpecSet * rates, int incr)
 {
     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.
      */
@@ -444,6 +457,7 @@ delayUpdateClass3(class3DelayPool * class3, delaySpecSet * rates, int incr)
     else
        i = 0;
     for (;;) {
+       assert(i < NET_MAP_SZ);
        if (i != 255 && class3->network_map[i] == 255)
            return;
        if (individual_restore_bytes != -incr) {
@@ -453,16 +467,19 @@ delayUpdateClass3(class3DelayPool * class3, delaySpecSet * rates, int 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;
            }
        }
@@ -471,7 +488,7 @@ delayUpdateClass3(class3DelayPool * class3, delaySpecSet * rates, int incr)
            (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;
     }
 }
@@ -663,7 +680,8 @@ delayPoolStats2(StoreEntry * sentry, unsigned short pool)
     /* 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);
@@ -675,7 +693,7 @@ delayPoolStats2(StoreEntry * sentry, unsigned short pool)
     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],
@@ -697,7 +715,9 @@ delayPoolStats3(StoreEntry * sentry, unsigned short pool)
     /* 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);
@@ -708,7 +728,7 @@ delayPoolStats3(StoreEntry * sentry, unsigned short pool)
        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],
@@ -731,12 +751,12 @@ delayPoolStats3(StoreEntry * sentry, unsigned short pool)
     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],
@@ -750,7 +770,7 @@ delayPoolStats3(StoreEntry * sentry, unsigned short pool)
     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],
index b6782ba2f2794d1c09af98a63771047ecd3531eb..bdd225de2492aa3554ff63ce10c9599c1c657d68 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index b1676481a004f28fe2d4649c44df1d1003b4fe64..63005cd05c8f57f40b0f4c027644866d9a53cc18 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index fa4fa6401df4eb29b210c2e0e84b3165afd10147..8b8ae9243ad995e1ec7f064e807aadb8d90b08ea 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -76,6 +76,7 @@ static int event_queued = 0;
 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);
@@ -83,6 +84,7 @@ static idns_query *idnsFindQuery(unsigned short id);
 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)
@@ -104,7 +106,7 @@ 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++;
 }
@@ -116,6 +118,16 @@ idnsFreeNameservers(void)
     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)
 {
@@ -127,7 +139,6 @@ 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)
@@ -137,7 +148,7 @@ idnsParseResolvConf(void)
        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);
@@ -172,6 +183,17 @@ idnsStats(StoreEntry * sentry)
     }
 }
 
+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)
 {
@@ -202,10 +224,7 @@ 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
@@ -353,6 +372,7 @@ idnsCheckQueue(void *unused)
            memFree(q, MEM_IDNS_QUERY);
        }
     }
+    idnsTickleQueue();
 }
 
 /* ====================================================================== */
@@ -372,7 +392,9 @@ idnsInit(void)
            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);
@@ -390,6 +412,7 @@ idnsShutdown(void)
        return;
     comm_close(DnsSocket);
     DnsSocket = -1;
+    idnsFreeNameservers();
 }
 
 void
index 784267d33596afe1cc0f17096574929d49169495..48e1865c017d471c78b0317435e626835db1d001 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 11d250ecaf824653584dcb79f8545618d513b690..5e206906654254e4fe06906112288324f2e03945 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -45,6 +45,9 @@ typedef enum {
     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,
@@ -197,6 +200,7 @@ typedef enum {
     HDR_CONTENT_MD5,
     HDR_CONTENT_RANGE,
     HDR_CONTENT_TYPE,
+    HDR_COOKIE,
     HDR_DATE,
     HDR_ETAG,
     HDR_EXPIRES,
index 7b4c22385ab9c2f24b3a6c87a043be4bb52b33a9..c5706e806281dc490c58d397ed64b9eb54a9a0c6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index db164bf5802e6bd269953a68f3b1043f6bb7015a..5cdb00db29e6709318412cd43ca56dc403262fda 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 7192715de53adfc2211ff823c866c37cd98352b9..4995a40ff6445e655bda6fb58fba34e29e8dafe9 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 2e5e1963f742a8a240316b72d019d1b986e279e8..c54c0b4bb066a72993c1887fddf5c5a478a9ca83 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 5998830a52edd2f03e84ff1bd54f48484c8c9d0d..6de07fddd665b25b28fd4f4a9a80442d7e3ba124 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -111,7 +111,7 @@ fwdCheckRetry(FwdState * fwdState)
        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;
@@ -206,6 +206,12 @@ fwdConnectTimeout(int fd, void *data)
        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);
 }
index 7c26b0dbbc897fb4bbc6ec9cda6b9d493132320a..fcf275e69188b1e6c92267fe5de6022a508c0cfb 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $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
index 8b3e702d50f9aa46699f79d2d403541e1ef9fe08..df6db959f9bb255fca72a326323071ed193590ee 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -568,6 +568,8 @@ ftpListParseParts(const char *buf, struct _ftp_flags flags)
        ct = buf + 1;
        p->type = 0;
        while (ct && *ct) {
+           long lt;
+           time_t t;
            switch (*ct) {
            case '\t':
                sscanf(ct + 1, "%[^,]", sbuf);
@@ -577,8 +579,10 @@ ftpListParseParts(const char *buf, struct _ftp_flags flags)
                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", &lt))
+                   break;
+               t = lt;
+               p->date = xstrdup(ctime(&t));
                *(strstr(p->date, "\n")) = '\0';
                break;
            case '/':
index 9ad03a44e3277d1807398c31aadde0c2f79dff7c..9dc83cadfda8bdfe465c3d1c324bc94e6c1fbc82 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 4b2697eee19f01f949bcd8834d1f0f4b911fc485..feb6dbb03c75eb7c0e3ea40dae148899e77e87cc 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $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
index 9a7a42376f6b7c7b8e40acbb7753b7925de7fe39..b54bb8f243a133d004d504414ec645ed43b9fbf9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -805,7 +805,7 @@ htcpHandle(char *buf, int sz, struct sockaddr_in *from)
     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);
index 1b45600c8ef38ba21b3050299021701db3311c41..571ac13dc868acf0c83bbac8b00055f7d1a21743 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -854,7 +854,9 @@ httpSendRequest(HttpStateData * httpState)
     /*
      * 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;
index 69603284dcbaf64afb7b594a3bebffeb7ee63d48..2dc1e8c0d9ba38dc5ef2e37abefeacb8d6febe71 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 27428043a2296d2d089e846e988ee1757ded8ece..84de369b0a8cf6a8f4a0e119075a142a904bbab6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index ba8ad84a886bde30b75c7658820b1e7ef2a5a9bd..9e2271ab8661d76b96882233481b927e93dc45b3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 4110d0c28ef857dff72a95f4d75973c66c449b85..57571a3e8e35445195e208ce784be4b69ebe26f9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 05869f3fe44fe912a66231a8dc8e0913e623847e..f076d4fb90ef490a9ff3cf73588f6fa167aeaf54 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 388c4e290b8807dd660276db8fd2186015720477..1f08eb044d655029b02be2c0824056e8f45c2271 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index ee6cd1aa867ef753106cec10bf70819cb818b2a0..eb6ee01bc8990145bb9f79b2bf617328166b8619 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index b6e6b69a8de1ceb2c67dd56d0c5487e7a6925dcd..c87bcba91f39dc5841fd49091e08f01de775f9b3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index dee88385ea00144ddae3fbd32cf884fd5ff1ec79..c215569533e3d3d5bf182f9bbd07f4f06bcf0e0a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -71,6 +71,7 @@ extern void log_trace_init(char *);
 #endif
 static EVH SquidShutdown;
 static void mainSetCwd(void);
+static int checkRunningPid(void);
 
 static const char *squid_start_script = "squid_start";
 
@@ -431,6 +432,10 @@ mainSetCwd(void)
 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);
@@ -511,6 +516,8 @@ mainInitialize(void)
        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 */
 
@@ -610,6 +617,9 @@ main(int argc, char **argv)
        if (opt_parse_cfg_only)
            return parse_err;
     }
+    if (-1 == opt_send_signal)
+       if (checkRunningPid())
+           exit(1);
 
 #if TEST_ACCESS
     comm_init();
@@ -621,10 +631,18 @@ main(int argc, char **argv)
 
     /* 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();
@@ -766,6 +784,20 @@ mainStartScript(const char *prog)
     }
 }
 
+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[])
 {
@@ -789,6 +821,7 @@ 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);
@@ -801,12 +834,14 @@ watch_child(char *argv[])
        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);
index 0d360fe9be4cf855ba8121d1b30a7188fb83c8b6..fec63c764d30ab91c4186abdd91273388e8a48f6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index d6edbf5e39b47ba2c9142661e1618a12f7e3f08d..2bf36bc1e9d468c11154ac468e6722507c136907 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 60ebacda8544de1815395795cf34efa142168182..62e0af202819245bb4c394829e4ea7037a1a831d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index ca0bec7175e925b9a21ada55f761656c40ce4444..297bf0747193fa7b8e5bf0cf12d8bc7830f48d09 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index bf32c63eef90724356e3a27072b9156ad1bd9ab7..51ffb890e264b863ae9e1ea17cd456d7a5cc62fa 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 2ecbec8857d0eb6b3e0ebaca91a16abd72240dc1..c2226323a5bcb512ae0957e74eeb2ede2218d5bb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 7d92a972a4aab66d5404acfad8d96d2559c57e55..17fbc8b1e615a538b7030dbcb3921289d666193d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 1be75ce9452ac7061cb05ed978131c255b4961e5..435e60c22c97640174284d03cbadf99fe37e93f0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 05c72f101afbf96a46de88f1629b9552b2651f80..4f39b48118c119b198b8edf0a9c6b99e558d47c0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 919544238d043164b239920959d7ce2f760f146d..78efbff3096a7609b9a1f1f57768b79cca452372 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -374,6 +374,7 @@ extern HttpHeaderFieldInfo *httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs
 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);
index 5a3e905816e891a7ceb5c154e5ff161abe62a910..e99ef73ff036d36fc4c2be799f230e5bb416ffde 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $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
index 63b5985580becbf7673f3be61409c8d2d9da9609..3e89d1a6bec848b2b28a92800e7b20ba6df3b5d8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -108,6 +108,7 @@ redirectStart(clientHttpRequest * http, RH * handler, void *data)
        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 */
index 2bc5e76389aaba97e8a71a7d13e86b50b663fdf0..356094a6f795b9a8a8192b92c0f21d738ac7e7e8 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $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
index 2fbcd397bfe7f8c3a16e1e4b41625fd8def5a777..131738668178d89e991a475224198f88ff381cbd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 9aac952b8c9ece1eca34be3f64dc44dfe72772bb..a63075292605b6e74cb6de15d1205646f329cd96 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 544f2fa436ababb4abeae3cafda3e1b1e730b99f..a0b2bc713d67a6c2cd57defab3a1f6ecf1906874 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 8d114ddea6d3d02b5a6d0514bcc1e791cf070092..ca258172c169c961879309b2ebcec09ff61407ab 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 94c2e1f1a0466d2f786432801e0fddfa47356aed..67c39e9324af09527f12a9e706676b4cc19aae87 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 5e9ef651ec29bcf927b01f4ed6874fcd4559231d..9637c962f2f36867ea010491876bf58b80e9bba1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 9e4cace2a030659400126c115608332e164e2273..31cb87cb4a7b0bfe4ae5dad2888022458e5c0105 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 06ee5927f9e4e097018c075529ec5d9c7d0000d2..6556127e6ff99b736cfcb72d9445061354671f95 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -1254,9 +1254,24 @@ storeTimestampsSet(StoreEntry * entry)
 {
     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;
index 54e6e740a7fba8117af93fc8924f836f5087af9f..781deb2977392d99e538707ede84dd5ed3246f17 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -384,12 +384,12 @@ storeClientReadHeader(void *data, const char *buf, ssize_t len)
     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;
     }
index 282a66511ed064e04d46aeb9127f689c1f505965..eab7d0c60f190fd1b690e3dbeda29ff2879b7491 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
index 06362d7b6066292bf32486d188d2f72440d7e29f..ad2d9a7889f434e2593f0eed8e3f50ab93a35bcb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index d0d4ea344e7b60da7d0c6b30cb994c8efbdbd9fa..908da4e9cfeaeb2e93c4658678394989cac5abf9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 4c68edd6b34bd9aa9724ea1b90622ac83358943a..80468206895eb39e88b6753f26999d4e469c876b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index ce3622f31788ea9a23c2398d9b3b6ed0f69ede56..a8892cf61291c65c0c1b858e09e018414ce16c96 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 06aae94e215c542af14a3e3ce560e9029327d6d4..8269bc9ab2f2ee97518339cdf7736720c99e0f03 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 9cbbe9d14a73384b3db0000cab5ebcb3c71a3418..7a6a3e6ac1676026131676ea7666e1512bf732b3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 0115628388162a5dff31158199bd86dd10ce35c8..66285c44588bf8404a5ed4522a067cccb4238cc9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 7476688ccb4c4ccdd421b892860d8cde4e19d8ae..479fec2fe876536adfcc48677544b1692e5e9dc7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -308,13 +308,17 @@ struct _SquidConfig {
     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;
@@ -378,7 +382,9 @@ struct _SquidConfig {
     } Netdb;
     struct {
        int log_udp;
+#if USE_DNSSERVER
        int res_defnames;
+#endif
        int anonymizer;
        int client_db;
        int query_icmp;
@@ -404,6 +410,8 @@ struct _SquidConfig {
        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
@@ -475,12 +483,13 @@ struct _SquidConfig {
 #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
index 66b7c2d057b5de226f4bc8ca330bf336bfc0f014..3f3d52c3c4f172f1afa9720242ae7044c15d1fa4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 1a93a834d5f8e313c3eb089f50dc1dacbbd798cc..fb7d384b85f8e08c932d5ca8153d0ae721f697fc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -482,6 +482,7 @@ leave_suid(void)
 {
     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;
@@ -491,12 +492,15 @@ leave_suid(void)
     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
index f61b180ea73b336826b0fc74e324e238052d492a..ce83f7ab7b8c7939278006b1740c64454357ecab 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 421c92b56c3c14026d6fb68f4aa444a0968ca76b..8e289d18b851057512f44ff254b5d3a22b559b66 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index b35921241dff085bbe9a785308d05103be40d9f7..dd25a69a6a3942348929531d026cc4e785100197 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
index 93b0e4887a67e2ff64d2519e301d458848e247aa..dc7d2f7396906a223456d6cbd97b0d273aab8da8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 7f0b68521986869e239642676f5752d7efe357cf..ebbd390579d7d18f5953767edb020f4cfc7a25eb 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *
- * $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
index 9037b50383931edc3cff393228f26d1bfcd8767d..8a8374b707a8bf0449420b6acc76899b8c3b2f77 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index ec383539b2c65380a6087ec3a0a3e2823329e8de..ddf82afde1a94e1786c8b48525c0018fe31b58d7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
index 7d631e762b54883d2c2b5a51cf48161b4543b9a2..326985a12d07cce439194edb9cd6249438df6237 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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
@@ -265,7 +265,7 @@ wccpHereIam(void *voidnotused)
 
     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);
 
index 5fb184a5999accf686a2dde560025c6e7974355d..133296bddf597d2b3484a03252e5df572e5ae1e9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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