#
-# $Id: cf.data.pre,v 1.155 1999/05/19 19:57:36 wessels Exp $
+# $Id: cf.data.pre,v 1.156 1999/06/16 21:23:31 wessels Exp $
#
#
# SQUID Internet Object Cache http://squid.nlanr.net/Squid/
and coredump files will be left there.
DOC_END
+NAME: redirector_bypass
+TYPE: onoff
+LOC: Config.onoff.redirector_bypass
+DEFAULT: off
+DOC_START
+ When this is 'on', a request will not go through the
+ redirector if all redirectors are busy. If this is 'off'
+ and the redirector queue grows too large, Squid will exit
+ with a FATAL erorr and ask you to increase the number of
+ redirectors. You should only enable this if the redirectors
+ are not critical to your caching system. If you use
+ redirectors for access control, and you enable this option,
+ then users may have access to pages that they should not
+ be allowed to request.
+DOC_END
+
EOF
/*
- * $Id: redirect.cc,v 1.79 1999/04/07 21:39:06 wessels Exp $
+ * $Id: redirect.cc,v 1.80 1999/06/16 21:23:32 wessels Exp $
*
* DEBUG: section 29 Redirector
* AUTHOR: Duane Wessels
static void redirectStateFree(redirectStateData * r);
static helper *redirectors = NULL;
static OBJH redirectStats;
+static int n_bypassed = 0;
static void
redirectHandleReply(void *data, char *reply)
{
storeAppendPrintf(sentry, "Redirector Statistics:\n");
helperStats(sentry, redirectors);
+ if (Config.onoff.redirector_bypass)
+ storeAppendPrintf(sentry, "\nNumber of requests bypassed "
+ "because all redirectors were busy: %d\n", n_bypassed);
}
/**** PUBLIC FUNCTIONS ****/
handler(data, NULL);
return;
}
+ if (Config.onoff.redirector_bypass && redirectors->stats.queue_size) {
+ /* Skip redirector if there is one request queued */
+ n_bypassed++;
+ handler(data, NULL);
+ return;
+ }
r = xcalloc(1, sizeof(redirectStateData));
cbdataAdd(r, cbdataXfree, 0);
r->orig_url = xstrdup(http->uri);
/*
- * $Id: structs.h,v 1.297 1999/06/16 21:22:14 wessels Exp $
+ * $Id: structs.h,v 1.298 1999/06/16 21:23:34 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
int redir_rewrites_host;
int prefer_direct;
int strip_query_terms;
+ int redirector_bypass;
} onoff;
acl *aclList;
struct {