]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
removed unused code; updated comments; formatting
authorwessels <>
Tue, 17 Mar 1998 11:00:11 +0000 (11:00 +0000)
committerwessels <>
Tue, 17 Mar 1998 11:00:11 +0000 (11:00 +0000)
src/cf.data.pre
src/client_side.cc
src/errorpage.cc
src/http.cc
src/protos.h
src/squid.h
src/structs.h
src/urn.cc

index ebd58282d1990e24c29d961f5684a39631b414c7..4b94cb5ed5002267bf00487c35680ff7a23dd4fb 100644 (file)
@@ -273,39 +273,6 @@ EXAMPLE:
        neighbor_type_domain cache.foo.org sibling .au .de
 DOC_END
 
-NAME: single_parent_bypass
-COMMENT: on|off
-TYPE: onoff
-DEFAULT: off
-LOC: Config.onoff.single_parent_bypass
-DOC_START
-       This tag specifies that it is okay to bypass the hierarchy
-       "Pinging" when there is only a single parent for a given URL.
-
-       Usage: single_parent_bypass on|off
-
-       Before actually sending ICP "ping" packets to parents and
-       neighbors, we figure out which hosts would be pinged based
-       on the cache_host_domain rules, etc.  Often it may be the
-       case that only a single parent cache would be pinged.
-
-       Since there is only a single parent, there is a very good
-       chance that we will end up fetching the object from that
-       parent.  For this reason, it may be beneficial to avoid
-       the ping and just fetch the object anyway.
-
-       However, if we avoid the ping, we will be assuming that the
-       parent host is reachable and that the cache process is running.
-       By using the ping, we can be reasonably sure that the parent
-       host will be able to handle our request.  If the ping fails then
-       it may be possible to fetch the object directly from the source.
-
-       To favor the resiliency provided by the ping algorithm,
-       single_parent_bypass is 'off' by default.
-
-single_parent_bypass off
-DOC_END
-
 NAME: neighbor_timeout neighbour_timeout
 COMMENT: (seconds)
 DEFAULT: 2 seconds
index 0286fcd6dfae81ae9c1abdc8e55608596caf37de..0f521d2730fd90f22f02c5bdcce4dbb7b4ccba9d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.229 1998/03/17 00:38:52 wessels Exp $
+ * $Id: client_side.cc,v 1.230 1998/03/17 04:00:12 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -147,11 +147,7 @@ void
 clientAccessCheckDone(int answer, void *data)
 {
     clientHttpRequest *http = data;
-#if 0
-    char *redirectUrl = NULL;
-#else
     int page_id = -1;
-#endif
     ErrorState *err = NULL;
     HttpReply *rep;
     debug(33, 5) ("clientAccessCheckDone: '%s' answer=%d\n", http->uri, answer);
@@ -172,7 +168,8 @@ clientAccessCheckDone(int answer, void *data)
        httpReplyDestroy(rep);
     } else {
        debug(33, 5) ("Access Denied: %s\n", http->uri);
-       debug(33, 5) ("AclMatchedName = %s\n", AclMatchedName ? AclMatchedName : "<null>");
+       debug(33, 5) ("AclMatchedName = %s\n",
+               AclMatchedName ? AclMatchedName : "<null>");
        http->log_type = LOG_TCP_DENIED;
        http->entry = clientCreateStoreEntry(http, http->request->method, 0);
        page_id = aclGetDenyInfoPage(&Config.denyInfoList, AclMatchedName);
@@ -837,7 +834,10 @@ clientBuildReplyHeader(clientHttpRequest * http,
        if (!hdr_len && !strncasecmp(xbuf, "HTTP/", 5) && l > 8 &&
            (isspace(xbuf[8]) || isspace(xbuf[9])))
            xmemmove(xbuf + 5, "1.0 ", 4);
-#if 0
+#if DONT_FILTER_THESE
+       /*
+        * but you might want to if you run Squid as a HTTP accelerator
+        */
        if (strncasecmp(xbuf, "Accept-Ranges:", 14) == 0)
            continue;
        if (strncasecmp(xbuf, "Etag:", 5) == 0)
index 73c672ae7a1b3235672857d08ac0e156aaaae959..d08c25d1e6686a2a11440b090165a36d3a29931b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.cc,v 1.121 1998/03/07 23:43:05 rousskov Exp $
+ * $Id: errorpage.cc,v 1.122 1998/03/17 04:00:13 wessels Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -240,7 +240,10 @@ errorAppendEntry(StoreEntry * entry, ErrorState * err)
 {
     HttpReply *rep;
     MemObject *mem = entry->mem_obj;
-#if 0  /* we might have an ok store for put etc */
+#if 0
+    /*
+     *  Kostas sez PUT "success" replies might not be STORE_PENDING?
+     */
     assert(entry->store_status == STORE_PENDING);
 #endif
     assert(mem != NULL);
index 58aa75b48ff37ad96bf1d4b465df0fb429b74575..e4fe0bc0a1b24b353c24a9b96bc21b0a5b61c453 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.255 1998/03/16 21:45:01 wessels Exp $
+ * $Id: http.cc,v 1.256 1998/03/17 04:00:13 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -125,7 +125,6 @@ enum {
 
 static CNCB httpConnectDone;
 static CWCB httpSendComplete;
-static CWCB *sendHeaderDone;
 static CWCB httpSendRequestEntry;
 
 static PF httpReadReply;
@@ -722,6 +721,7 @@ httpSendRequest(int fd, void *data)
     StoreEntry *entry = httpState->entry;
     int cfd;
     peer *p = httpState->peer;
+    CWCB *sendHeaderDone;
 
     debug(11, 5) ("httpSendRequest: FD %d: httpState %p.\n", fd, httpState);
     buflen = strLen(req->urlpath);
@@ -894,7 +894,7 @@ httpRestart(HttpStateData * httpState)
 {
     /* restart a botched request from a persistent connection */
     debug(11, 2) ("Retrying HTTP request for %s\n", storeUrl(httpState->entry));
-    if (httpState->orig_request->method != METHOD_GET) {
+    if (pumpMethod(httpState->orig_request->method)) {
        debug(11, 1) ("Potential Coredump: httpRestart %s %s\n",
            RequestMethodStr[httpState->orig_request->method],
            storeUrl(httpState->entry));
index 23fc25e9ddd2acb8b2d884a7a003e554c6c61ba5..1bcd54f52c9824e61a57e8a7d068f760a2158517 100644 (file)
@@ -21,11 +21,7 @@ extern void aclDestroyAcls(acl **);
 extern void aclParseAccessLine(struct _acl_access **);
 extern void aclParseAclLine(acl **);
 extern struct _acl *aclFindByName(const char *name);
-#if 0
-extern char *aclGetDenyInfoUrl(struct _acl_deny_info_list **, const char *name);
-#else
 extern int aclGetDenyInfoPage(acl_deny_info_list ** head, const char *name);
-#endif
 extern void aclParseDenyInfoLine(struct _acl_deny_info_list **);
 extern void aclDestroyDenyInfoList(struct _acl_deny_info_list **);
 extern void aclDestroyRegexList(struct _relist *data);
index 49f501b637063cc130c4fdae96eb8751e12d8e11..406434be529b7a0c28bbbbaf292874749e1fbbdb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.164 1998/03/16 20:30:05 wessels Exp $
+ * $Id: squid.h,v 1.165 1998/03/17 04:00:16 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -31,7 +31,6 @@
 #ifndef SQUID_H
 #define SQUID_H
 
-
 #include "config.h"
 
 /*
@@ -307,7 +306,6 @@ struct rusage {
 #endif
 
 #include "md5.h"
-
 #include "Stack.h"
 
 #ifdef SQUID_SNMP
index 7021108d09eb1bd94a02c6f2d94780b44b32511a..bded2f3796f8c1a84a44d9daf7bb9b454ce908f0 100644 (file)
@@ -310,7 +310,6 @@ struct _SquidConfig {
        int common_log;
        int log_mime_hdrs;
        int ident_lookup;
-       int single_parent_bypass;
        int log_fqdn;
        int announce;
        int accel_with_proxy;
@@ -1012,11 +1011,7 @@ struct _request_t {
     char login[MAX_LOGIN_SZ];
     char host[SQUIDHOSTNAMELEN + 1];
     u_short port;
-#if 0                          /* trying new interface */
-    char urlpath[MAX_URL];
-#else
     String urlpath;
-#endif
     int link_count;            /* free when zero */
     int flags;
     time_t max_age;
index 30e92deff47e9516d178d25a0b85f9615c91dc1a..d21ff2472d77724bd0c3d26520474ea7be6865a6 100644 (file)
@@ -155,9 +155,6 @@ urnStart(request_t * r, StoreEntry * e)
 static void
 urnHandleReply(void *data, char *buf, ssize_t size)
 {
-#if 0
-    LOCAL_ARRAY(char, line, 4096);
-#endif
     UrnState *urnState = data;
     StoreEntry *e = urnState->entry;
     StoreEntry *urlres_e = urnState->urlres_e;
@@ -166,12 +163,7 @@ urnHandleReply(void *data, char *buf, ssize_t size)
     wordlist *w;
     wordlist *urls;
     wordlist *min_w;
-#if 0
-    int l;
-    String *S;
-#else
     MemBuf mb;
-#endif
     ErrorState *err;
     double tmprtt;
     StoreEntry *tmpentry;