#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.52 1996/11/01 07:53:00 wessels Exp $
+# $Id: Makefile.in,v 1.53 1996/11/05 20:43:50 wessels Exp $
#
# Uncomment and customize the following to suit your needs:
#
UTILS = dnsserver ftpget pinger
CGIPROGS = cachemgr.cgi
OBJS = \
- acl.o async_io.o background.o cache_cf.o client_db.o \
- client_side.o comm.o debug.o disk.o dns.o errorpage.o \
- fdstat.o filemap.o fqdncache.o ftp.o gopher.o hash.o \
- http.o icmp.o icp.o ident.o ipcache.o main.o mime.o \
- neighbors.o net_db.o objcache.o proto.o redirect.o \
+ acl.o \
+ async_io.o \
+ background.o \
+ cache_cf.o \
+ client_db.o \
+ client_side.o \
+ comm.o \
+ debug.o \
+ disk.o \
+ dns.o \
+ errorpage.o \
+ fdstat.o \
+ filemap.o \
+ fqdncache.o \
+ ftp.o \
+ gopher.o \
+ hash.o \
+ http.o \
+ icmp.o \
+ icp.o \
+ ident.o \
+ ipcache.o \
+ main.o \
+ mime.o \
+ neighbors.o \
+ net_db.o \
+ objcache.o \
+ pass.o \
+ proto.o \
+ redirect.o \
refresh.o \
- send-announce.o ssl.o stack.o stat.o stmem.o store.o \
- store_clean.o storetoString.o tools.o timestamps.o \
- url.o wais.o $(XTRA_OBJS)
+ send-announce.o \
+ ssl.o \
+ stack.o \
+ stat.o \
+ stmem.o \
+ store.o \
+ store_clean.o \
+ storetoString.o \
+ tools.o \
+ timestamps.o \
+ url.o \
+ wais.o \
+ $(XTRA_OBJS)
DEFAULTS = \
-DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" \
/*
- * $Id: comm.cc,v 1.96 1996/11/04 18:12:19 wessels Exp $
+ * $Id: comm.cc,v 1.97 1996/11/05 20:43:51 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
/* Send a udp datagram to specified TO_ADDR. */
int
-comm_udp_sendto(int fd, const struct sockaddr_in *to_addr, int addr_len, const char *buf, int len)
+comm_udp_sendto(int fd,
+ const struct sockaddr_in *to_addr,
+ int addr_len,
+ const char *buf,
+ int len)
{
- int bytes_sent;
-
- if ((bytes_sent = sendto(fd, buf, len, 0, to_addr, addr_len)) < 0) {
- debug(5, 1, "comm_udp_sendto: sendto failure: FD %d: %s\n", fd, xstrerror());
- debug(5, 1, "comm_udp_sendto: --> sin_family = %d\n", to_addr->sin_family);
- debug(5, 1, "comm_udp_sendto: --> sin_port = %d\n", htons(to_addr->sin_port));
- debug(5, 1, "comm_udp_sendto: --> sin_addr = %s\n", inet_ntoa(to_addr->sin_addr));
- debug(5, 1, "comm_udp_sendto: --> length = %d\n", len);
+ int x;
+ x = sendto(fd, buf, len, 0, (struct sockaddr *) to_addr, addr_len);
+ if (x < 0) {
+ debug(5, 1, "comm_udp_sendto: FD %d, %s, port %d: %s\n",
+ fd,
+ inet_ntoa(to_addr->sin_addr),
+ (int) htons(to_addr->sin_port),
+ xstrerror());
return COMM_ERROR;
}
- return bytes_sent;
+ return x;
}
void
/*
- * $Id: http.cc,v 1.95 1996/11/05 17:08:12 wessels Exp $
+ * $Id: http.cc,v 1.96 1996/11/05 20:43:52 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
int exp;
int clen;
int ctype;
+ struct {
+ int private;
+ int cachable;
+ int nocache;
+ } cc;
} ReplyHeaderStats;
static void httpStateFree _PARAMS((int fd, void *));
}
} else if (!strncasecmp(t, "Cache-Control:", 14)) {
if ((t = strtok(NULL, w_space))) {
- if (!strncasecmp(t, "private", 7))
+ if (!strncasecmp(t, "private", 7)) {
reply->cache_control |= HTTP_CC_PRIVATE;
- else if (!strncasecmp(t, "cachable", 8))
+ ReplyHeaderStats.cc.private++;
+ } else if (!strncasecmp(t, "cachable", 8)) {
reply->cache_control |= HTTP_CC_CACHABLE;
- else if (!strncasecmp(t, "no-cache", 8))
+ ReplyHeaderStats.cc.cachable++;
+ } else if (!strncasecmp(t, "no-cache", 8)) {
reply->cache_control |= HTTP_CC_NOCACHE;
+ ReplyHeaderStats.cc.nocache++;
+ }
}
}
t = strtok(NULL, "\n");
ReplyHeaderStats.ctype);
storeAppendPrintf(entry, "{Content-Length: %d}\n",
ReplyHeaderStats.clen);
+ storeAppendPrintf(entry, "{Cache-Control Private: %d}\n",
+ ReplyHeaderStats.cc.private);
+ storeAppendPrintf(entry, "{Cache-Control Cachable: %d}\n",
+ ReplyHeaderStats.cc.cachable);
+ storeAppendPrintf(entry, "{Cache-Control Nocache: %d}\n",
+ ReplyHeaderStats.cc.nocache);
storeAppendPrintf(entry, close_bracket);
}
/*
- * $Id: squid.h,v 1.68 1996/11/05 17:08:23 wessels Exp $
+ * $Id: squid.h,v 1.69 1996/11/05 20:43:56 wessels Exp $
*
* AUTHOR: Duane Wessels
*
extern void timestampsSet _PARAMS((StoreEntry *));
extern int waisStart _PARAMS((int, const char *, method_t, char *, StoreEntry *));
extern void storeDirClean _PARAMS((void));
+int
+passStart _PARAMS((int fd,
+ const char *url,
+ request_t * request,
+ char *buf,
+ int buflen,
+ int *size_ptr));
+
extern const char *const dash_str;
extern const char *const null_string;