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
/*
- * $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
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);
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);
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)
/*
- * $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
{
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);
/*
- * $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
static CNCB httpConnectDone;
static CWCB httpSendComplete;
-static CWCB *sendHeaderDone;
static CWCB httpSendRequestEntry;
static PF httpReadReply;
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);
{
/* 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));
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);
/*
- * $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
*
#ifndef SQUID_H
#define SQUID_H
-
#include "config.h"
/*
#endif
#include "md5.h"
-
#include "Stack.h"
#ifdef SQUID_SNMP
int common_log;
int log_mime_hdrs;
int ident_lookup;
- int single_parent_bypass;
int log_fqdn;
int announce;
int accel_with_proxy;
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;
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;
wordlist *w;
wordlist *urls;
wordlist *min_w;
-#if 0
- int l;
- String *S;
-#else
MemBuf mb;
-#endif
ErrorState *err;
double tmprtt;
StoreEntry *tmpentry;