rpms/squid/devel squid-2.6.STABLE4-cache-peer.patch, NONE, 1.1 squid-2.6.STABLE4-compile.patch, NONE, 1.1 squid-2.6.STABLE4-coss-gcc.patch, NONE, 1.1 squid-2.6.STABLE4-coss.patch, NONE, 1.1 squid-2.6.STABLE4-forward.patch, NONE, 1.1 squid-2.6.STABLE4-mem-leak-ncsa.patch, NONE, 1.1 squid-2.6.STABLE4-mem-leak.patch, NONE, 1.1 squid-2.6.STABLE4-snmp.patch, NONE, 1.1 squid-2.6.STABLE4-syslog.patch, NONE, 1.1 .cvsignore, 1.20, 1.21 sources, 1.22, 1.23 squid.spec, 1.73, 1.74 squid-2.6.STABLE3-acl-ports.patch, 1.1, NONE squid-2.6.STABLE3-acl-time-2.patch, 1.1, NONE squid-2.6.STABLE3-acl-time.patch, 1.1, NONE squid-2.6.STABLE3-italian.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Oct 2 10:13:21 UTC 2006


Author: stransky

Update of /cvs/dist/rpms/squid/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv24380

Modified Files:
	.cvsignore sources squid.spec 
Added Files:
	squid-2.6.STABLE4-cache-peer.patch 
	squid-2.6.STABLE4-compile.patch 
	squid-2.6.STABLE4-coss-gcc.patch squid-2.6.STABLE4-coss.patch 
	squid-2.6.STABLE4-forward.patch 
	squid-2.6.STABLE4-mem-leak-ncsa.patch 
	squid-2.6.STABLE4-mem-leak.patch squid-2.6.STABLE4-snmp.patch 
	squid-2.6.STABLE4-syslog.patch 
Removed Files:
	squid-2.6.STABLE3-acl-ports.patch 
	squid-2.6.STABLE3-acl-time-2.patch 
	squid-2.6.STABLE3-acl-time.patch 
	squid-2.6.STABLE3-italian.patch 
Log Message:
new upstream, fixes from upstream bugzilla, items #1782,#1780,#1785,#1719,#1784,#1776

squid-2.6.STABLE4-cache-peer.patch:
 cache_cf.c |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

--- NEW FILE squid-2.6.STABLE4-cache-peer.patch ---
---------------------
PatchSet 11042 
Date: 2006/09/30 21:01:08
Author: hno
Branch: HEAD
Tag: (none) 
Log:
Bug #1719: Incorrect error message on invalid cache_peer specifications

aborted with an assertion on the first request instead of rejecting the
configuration as invalid.

Members: 
	src/cache_cf.c:1.457->1.458 

Index: squid/src/cache_cf.c
===================================================================
RCS file: /cvsroot/squid/squid/src/cache_cf.c,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -r1.457 -r1.458
--- squid/src/cache_cf.c	22 Sep 2006 10:47:04 -0000	1.457
+++ squid/src/cache_cf.c	30 Sep 2006 21:01:08 -0000	1.458
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.c,v 1.457 2006/09/22 10:47:04 hno Exp $
+ * $Id: cache_cf.c,v 1.458 2006/09/30 21:01:08 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -277,6 +277,15 @@
     return i;
 }
 
+static u_short
+GetShort(void)
+{
+    char *token = strtok(NULL, w_space);
+    if (token == NULL)
+	self_destruct();
+    return xatos(token);
+}
+
 static squid_off_t
 GetOffT(void)
 {
@@ -1583,7 +1592,6 @@
 {
     char *token = NULL;
     peer *p;
-    int i;
     p = cbdataAlloc(peer);
     p->http_port = CACHE_HTTP_PORT;
     p->icp.port = CACHE_ICP_PORT;
@@ -1597,10 +1605,10 @@
     if ((token = strtok(NULL, w_space)) == NULL)
 	self_destruct();
     p->type = parseNeighborType(token);
-    i = GetInteger();
-    p->http_port = (u_short) i;
-    i = GetInteger();
-    p->icp.port = (u_short) i;
+    p->http_port = GetShort();
+    if (!p->http_port)
+	self_destruct();
+    p->icp.port = GetShort();
     p->connection_auth = -1;	/* auto */
     while ((token = strtok(NULL, w_space))) {
 	if (!strcasecmp(token, "proxy-only")) {
@@ -1979,16 +1987,13 @@
 parse_ushortlist(ushortlist ** P)
 {
     char *token;
-    int i;
+    u_short i;
     ushortlist *u;
     ushortlist **U;
     while ((token = strtok(NULL, w_space))) {
-	if (sscanf(token, "%d", &i) != 1)
-	    self_destruct();
-	if (i < 0)
-	    i = 0;
+	i = GetShort();
 	u = xcalloc(1, sizeof(ushortlist));
-	u->i = (u_short) i;
+	u->i = i;
 	for (U = P; *U; U = &(*U)->next);
 	*U = u;
     }
@@ -2413,12 +2418,7 @@
 static void
 parse_ushort(u_short * var)
 {
-    int i;
-
-    i = GetInteger();
-    if (i < 0)
-	i = 0;
-    *var = (u_short) i;
+    *var = GetShort();
 }
 
 static void

squid-2.6.STABLE4-compile.patch:
 fs/aufs/async_io.h       |    1 -
 fs/coss/store_dir_coss.c |    3 +--
 globals.h                |    3 ++-
 3 files changed, 3 insertions(+), 4 deletions(-)

--- NEW FILE squid-2.6.STABLE4-compile.patch ---
---------------------
PatchSet 11036 
Date: 2006/09/25 19:31:34
Author: serassio
Branch: HEAD
Tag: (none) 
Log:
Bug #1776: squid -2.6.STABLE4-20060925 doesn't compile properly

n_coss_dirs is referenced from both coss and aufs, this errror happens
when building with aufs only. To avoid this, n_coss_dirs must be in globals.c

Members: 
	src/globals.h:1.121->1.122 
	src/fs/aufs/async_io.h:1.2->1.3 
	src/fs/coss/store_dir_coss.c:1.59->1.60 

Index: squid/src/globals.h
===================================================================
RCS file: /cvsroot/squid/squid/src/globals.h,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- squid/src/globals.h	30 Jul 2006 23:27:03 -0000	1.121
+++ squid/src/globals.h	25 Sep 2006 19:31:34 -0000	1.122
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.121 2006/07/30 23:27:03 hno Exp $
+ * $Id: globals.h,v 1.122 2006/09/25 19:31:34 serassio Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -177,5 +177,6 @@
 extern int need_linux_tproxy;	/* 0 */
 #endif
 extern int opt_parse_cfg_only;	/* 0 */
+extern int n_coss_dirs;		/* 0 */
 
 #endif /* SQUID_GLOBALS_H */
Index: squid/src/fs/aufs/async_io.h
===================================================================
RCS file: /cvsroot/squid/squid/src/fs/aufs/async_io.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- squid/src/fs/aufs/async_io.h	29 Jul 2006 17:37:18 -0000	1.2
+++ squid/src/fs/aufs/async_io.h	25 Sep 2006 19:31:34 -0000	1.3
@@ -8,7 +8,6 @@
 #define __ASYNC_IO_H__
 
 extern int n_asyncufs_dirs;
-extern int n_coss_dirs;
 extern int squidaio_nthreads;
 extern int squidaio_magic1;
 extern int squidaio_magic2;
Index: squid/src/fs/coss/store_dir_coss.c
===================================================================
RCS file: /cvsroot/squid/squid/src/fs/coss/store_dir_coss.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- squid/src/fs/coss/store_dir_coss.c	23 Sep 2006 10:34:41 -0000	1.59
+++ squid/src/fs/coss/store_dir_coss.c	25 Sep 2006 19:31:35 -0000	1.60
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_coss.c,v 1.59 2006/09/23 10:34:41 serassio Exp $
+ * $Id: store_dir_coss.c,v 1.60 2006/09/25 19:31:35 serassio Exp $
  *
  * DEBUG: section 47    Store COSS Directory Routines
  * AUTHOR: Eric Stern
@@ -48,7 +48,6 @@
 #define STORE_META_BUFSZ 4096
 #define HITONLY_BUFS 2
 
-int n_coss_dirs = 0;
 int max_coss_dir_size = 0;
 /* static int last_coss_pick_index = -1; */
 int coss_initialised = 0;

squid-2.6.STABLE4-coss-gcc.patch:
 store_dir_coss.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE squid-2.6.STABLE4-coss-gcc.patch ---
---------------------
PatchSet 11038 
Date: 2006/09/26 18:02:22
Author: hno
Branch: HEAD
Tag: (none) 
Log:
COSS cleanup making a local function static (makes GCC happier)

Members: 
	src/fs/coss/store_dir_coss.c:1.61->1.62 

Index: squid/src/fs/coss/store_dir_coss.c
===================================================================
RCS file: /cvsroot/squid/squid/src/fs/coss/store_dir_coss.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- squid/src/fs/coss/store_dir_coss.c	25 Sep 2006 20:14:41 -0000	1.61
+++ squid/src/fs/coss/store_dir_coss.c	26 Sep 2006 18:02:22 -0000	1.62
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_coss.c,v 1.61 2006/09/25 20:14:41 serassio Exp $
+ * $Id: store_dir_coss.c,v 1.62 2006/09/26 18:02:22 hno Exp $
  *
  * DEBUG: section 47    Store COSS Directory Routines
  * AUTHOR: Eric Stern
@@ -1053,7 +1053,7 @@
     storeAppendPrintf(e, " block-size=%d", 1 << cs->blksz_bits);
 }
 
-SwapDir *
+static SwapDir *
 storeCossDirPick(void)
 {
     int i, choosenext = 0;

squid-2.6.STABLE4-coss.patch:
 cf.data.pre              |    9 +++-
 fs/coss/store_coss.h     |    2 +
 fs/coss/store_dir_coss.c |   89 ++++++++++++++++++++++++++++++++++++++---------
 3 files changed, 80 insertions(+), 20 deletions(-)

--- NEW FILE squid-2.6.STABLE4-coss.patch ---
---------------------
PatchSet 11037 
Date: 2006/09/25 20:14:41
Author: serassio
Branch: HEAD
Tag: (none) 
Log:
Fix of some minor COSS portability issues:

- Open stripe FD error during shutdown
- Create COSS stripe when running squid -z
- Check if "cache_swap_log" is configured when using a coss raw disk device or a file stripe

Members: 
	src/cf.data.pre:1.371->1.372 
	src/fs/coss/store_coss.h:1.13->1.14 
	src/fs/coss/store_dir_coss.c:1.60->1.61 

Index: squid/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid/squid/src/cf.data.pre,v
retrieving revision 1.371
retrieving revision 1.372
diff -u -r1.371 -r1.372
--- squid/src/cf.data.pre	22 Sep 2006 06:36:51 -0000	1.371
+++ squid/src/cf.data.pre	25 Sep 2006 20:14:41 -0000	1.372
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.371 2006/09/22 06:36:51 swilton Exp $
+# $Id: cf.data.pre,v 1.372 2006/09/25 20:14:41 serassio Exp $
 #
 #
 # SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -1062,10 +1062,13 @@
 	see the --enable-storeio configure option.
 
 	'Directory' is a top-level directory where cache swap
-	files will be stored.  If you want to use an entire disk
+	files will be stored. If you want to use an entire disk
 	for caching, this can be the mount-point directory.
 	The directory must exist and be writable by the Squid
-	process.  Squid will NOT create this directory for you.
+	process. Squid will NOT create this directory for you.
+	Only using COSS, a raw disk device or a stripe file can
+	be specified, but the configuration of the "cache_wap_log"
+	tag is mandatory.
 
 	The ufs store type:
 
Index: squid/src/fs/coss/store_coss.h
===================================================================
RCS file: /cvsroot/squid/squid/src/fs/coss/store_coss.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- squid/src/fs/coss/store_coss.h	23 Sep 2006 10:34:41 -0000	1.13
+++ squid/src/fs/coss/store_coss.h	25 Sep 2006 20:14:41 -0000	1.14
@@ -22,6 +22,8 @@
 #define COSS_ALLOC_ALLOCATE		1
 #define COSS_ALLOC_REALLOC		2
 
+#define SWAPDIR_COSS "coss"
+
 #if USE_AUFSOPS
 /* XXX a hack; the async ops should be broken out! */
 typedef void AIOCB(int fd, void *cbdata, const char *buf,
Index: squid/src/fs/coss/store_dir_coss.c
===================================================================
RCS file: /cvsroot/squid/squid/src/fs/coss/store_dir_coss.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- squid/src/fs/coss/store_dir_coss.c	25 Sep 2006 19:31:35 -0000	1.60
+++ squid/src/fs/coss/store_dir_coss.c	25 Sep 2006 20:14:41 -0000	1.61
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_coss.c,v 1.60 2006/09/25 19:31:35 serassio Exp $
+ * $Id: store_dir_coss.c,v 1.61 2006/09/25 20:14:41 serassio Exp $
  *
  * DEBUG: section 47    Store COSS Directory Routines
  * AUTHOR: Eric Stern
@@ -49,7 +49,7 @@
 #define HITONLY_BUFS 2
 
 int max_coss_dir_size = 0;
-/* static int last_coss_pick_index = -1; */
+static int last_coss_pick_index = -1;
 int coss_initialised = 0;
 MemPool *coss_state_pool = NULL;
 MemPool *coss_index_pool = NULL;
@@ -136,7 +136,8 @@
 	if (stat(sd->path, &st) == 0) {
 	    if (S_ISDIR(st.st_mode))
 		strcat(pathtmp, "/stripe");
-	}
+	} else
+	    fatalf("stripePath: Cannot stat %s.", sd->path);
 	cs->stripe_path = xstrdup(pathtmp);
     }
     return cs->stripe_path;
@@ -149,6 +150,8 @@
     LOCAL_ARRAY(char, pathtmp, SQUID_MAXPATHLEN);
     LOCAL_ARRAY(char, digit, 32);
     char *pathtmp2;
+    struct stat st;
+
     if (Config.Log.swap) {
 	xstrncpy(pathtmp, sd->path, SQUID_MAXPATHLEN - 64);
 	pathtmp2 = pathtmp;
@@ -164,8 +167,14 @@
 	    strncat(path, digit, 3);
 	}
     } else {
-	xstrncpy(path, sd->path, SQUID_MAXPATHLEN - 64);
-	strcat(path, "/swap.state");
+	if (stat(sd->path, &st) == 0) {
+	    if (S_ISDIR(st.st_mode)) {
+		xstrncpy(path, sd->path, SQUID_MAXPATHLEN - 64);
+		strcat(path, "/swap.state");
+	    } else
+		fatal("storeCossDirSwapLogFile: 'cache_swap_log' is needed in your COSS configuration.");
+	} else
+	    fatalf("storeCossDirSwapLogFile: Cannot stat %s.", sd->path);
     }
     if (ext)
 	strncat(path, ext, 16);
@@ -562,9 +571,53 @@
 }
 
 static void
-storeCossDirNewfs(SwapDir * sd)
+storeCossDirNewfs(SwapDir * SD)
+{
+    struct stat st;
+    char *block;
+    int swap;
+    int i;
+    CossInfo *cs = (CossInfo *) SD->fsdata;
+
+    if (stat(SD->path, &st) == 0) {
+/* 
+ * TODO : handle the following case:
+ * SD->path is a full stripe file path
+ */
+	if (S_ISDIR(st.st_mode)) {
+	    if (stat(stripePath(SD), &st) != 0) {
+		debug(47, 1) ("Creating COSS stripe %s\n", stripePath(SD));
+		swap = open(stripePath(SD), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0600);
+		block = (char *) xcalloc(COSS_MEMBUF_SZ, 1);
+		for (i = 0; i < cs->numstripes; ++i) {
+		    if (write(swap, block, COSS_MEMBUF_SZ) < COSS_MEMBUF_SZ) {
+			fatalf("Failed to create COSS stripe %s\n", stripePath(SD));
+		    }
+		}
+		close(swap);
+		xfree(block);
+	    }
+	}
+    } else
+	debug(47, 0) ("Failed to create COSS swap space on %s\n", SD->path);
+}
+
+/*
+ * Only "free" the filesystem specific stuff here
+ */
+static void
+storeCossDirFree(SwapDir * SD)
 {
-    debug(47, 3) ("Creating swap space in %s\n", stripePath(sd));
+    CossInfo *cs = (CossInfo *) SD->fsdata;
+    if (cs->swaplog_fd > -1) {
+	file_close(cs->swaplog_fd);
+	cs->swaplog_fd = -1;
+    }
+    xfree(cs->stripes);
+    xfree(cs->memstripes);
+    xfree(cs);
+    SD->fsdata = NULL;		/* Will aid debugging... */
+
 }
 
 /* we are shutting down, flush all membufs to disk */
@@ -574,10 +627,7 @@
     CossInfo *cs = (CossInfo *) SD->fsdata;
     debug(47, 1) ("COSS: %s: syncing\n", stripePath(SD));
 
-#if USE_AUFSOPS
-    aioSync(SD);
-#endif
-    storeCossSync(SD);		/* This'll call a_file_syncqueue() */
+    storeCossSync(SD);		/* This'll call a_file_syncqueue() or a aioSync() */
 #if !USE_AUFSOPS
     a_file_closequeue(&cs->aq);
 #endif
@@ -745,7 +795,7 @@
     sd->init = storeCossDirInit;
     sd->newfs = storeCossDirNewfs;
     sd->dump = storeCossDirDump;
-    sd->freefs = storeCossDirShutdown;
+    sd->freefs = storeCossDirFree;
     sd->dblcheck = NULL;
     sd->statfs = storeCossDirStats;
     sd->maintainfs = NULL;
@@ -1003,7 +1053,6 @@
     storeAppendPrintf(e, " block-size=%d", 1 << cs->blksz_bits);
 }
 
-#if OLD_UNUSED_CODE
 SwapDir *
 storeCossDirPick(void)
 {
@@ -1014,7 +1063,7 @@
 	return NULL;
     for (i = 0; i < Config.cacheSwap.n_configured; i++) {
 	SD = &Config.cacheSwap.swapDirs[i];
-	if (SD->type == SWAPDIR_COSS) {
+	if (strcmp(SD->type, SWAPDIR_COSS) == 0) {
 	    if ((last_coss_pick_index == -1) || (n_coss_dirs == 1)) {
 		last_coss_pick_index = i;
 		return SD;
@@ -1028,7 +1077,7 @@
     }
     for (i = 0; i < Config.cacheSwap.n_configured; i++) {
 	SD = &Config.cacheSwap.swapDirs[i];
-	if (SD->type == SWAPDIR_COSS) {
+	if (strcmp(SD->type, SWAPDIR_COSS) == 0) {
 	    if ((last_coss_pick_index == -1) || (n_coss_dirs == 1)) {
 		last_coss_pick_index = i;
 		return SD;
@@ -1042,7 +1091,6 @@
     }
     return NULL;
 }
-#endif
 
 /*
  * initial setup/done code
@@ -1050,6 +1098,13 @@
 static void
 storeCossDirDone(void)
 {
+    int i, n_dirs = n_coss_dirs;
+
+    for (i = 0; i < n_dirs; i++)
+	storeCossDirShutdown(storeCossDirPick());
+/* 
+ * TODO : check if others memPoolDestroy() of COSS objects are needed here
+ */
     memPoolDestroy(coss_state_pool);
     coss_initialised = 0;
 }
@@ -1098,7 +1153,7 @@
     coss_index_pool = memPoolCreate("COSS index data", sizeof(CossIndexNode));
     coss_realloc_pool = memPoolCreate("COSS pending realloc", sizeof(CossPendingReloc));
     coss_op_pool = memPoolCreate("COSS pending operation", sizeof(CossReadOp));
-    cachemgrRegister("coss", "COSS Stats", storeCossStats, 0, 1);
+    cachemgrRegister(SWAPDIR_COSS, "COSS Stats", storeCossStats, 0, 1);
     coss_initialised = 1;
 }
 

squid-2.6.STABLE4-forward.patch:
 client_side.c |   27 ++++++++++++++++++++++++++-
 enums.h       |    9 ++++-----
 forward.c     |    5 +++--
 store.c       |   19 ++++++++++++++-----
 structs.h     |    3 ++-
 5 files changed, 49 insertions(+), 14 deletions(-)

--- NEW FILE squid-2.6.STABLE4-forward.patch ---
---------------------
PatchSet 11044 
Date: 2006/09/30 21:10:48
Author: hno
Branch: HEAD
Tag: (none) 
Log:
Bug #1780: Incorrect Vary processing in combination with collapsed_forwarding

collapsed_forwarding forgot to account for Vary:ing objects, causing them
to get cached as non-Vary:ing objects, ignoring the capabilities of the client.

Members: 
	src/client_side.c:1.679->1.680 
	src/enums.h:1.234->1.235 
	src/forward.c:1.116->1.117 
	src/store.c:1.566->1.567 
	src/structs.h:1.502->1.503 

Index: squid/src/client_side.c
===================================================================
RCS file: /cvsroot/squid/squid/src/client_side.c,v
retrieving revision 1.679
retrieving revision 1.680
diff -u -r1.679 -r1.680
--- squid/src/client_side.c	30 Sep 2006 21:05:37 -0000	1.679
+++ squid/src/client_side.c	30 Sep 2006 21:10:48 -0000	1.680
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.c,v 1.679 2006/09/30 21:05:37 hno Exp $
+ * $Id: client_side.c,v 1.680 2006/09/30 21:10:48 hno Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -2154,6 +2154,14 @@
 	    debug(33, 2) ("clientProcessHit: Vary detected!\n");
 	    return;
 	}
+    case VARY_RESTART:
+	/* Used on collapsed requests when the main request wasn't
+	 * compatible. Resart processing from the beginning.
+	 */
+	safe_free(r->vary_hdr);
+	safe_free(r->vary_headers);
+	clientProcessRequest(http);
+	return;
     case VARY_CANCEL:
 	/* varyEvaluateMatch found a object loop. Process as miss */
 	debug(33, 1) ("clientProcessHit: Vary object loop!\n");
@@ -3307,6 +3315,9 @@
 	http->entry = NULL;
 	return LOG_TCP_MISS;
     }
+    if (EBIT_TEST(e->flags, KEY_EARLY_PUBLIC)) {
+	r->flags.collapsed = 1;	/* Don't trust the store entry */
+    }
     if (EBIT_TEST(e->flags, ENTRY_SPECIAL)) {
 	/* Special entries are always hits, no matter what the client says */
 	debug(33, 3) ("clientProcessRequest2: ENTRY_SPECIAL HIT\n");
@@ -3350,6 +3361,7 @@
     debug(33, 4) ("clientProcessRequest: %s '%s'\n",
 	RequestMethodStr[r->method],
 	url);
+    r->flags.collapsed = 0;
     if (r->method == METHOD_CONNECT && !http->redirect.status) {
 	http->log_type = LOG_TCP_MISS;
 #if USE_SSL && SSL_CONNECT_INTERCEPT
@@ -3484,6 +3496,15 @@
     http->entry = clientCreateStoreEntry(http, r->method, r->flags);
     if (Config.onoff.collapsed_forwarding && r->flags.cachable && !r->flags.need_validation && (r->method = METHOD_GET || r->method == METHOD_HEAD)) {
 	http->entry->mem_obj->refresh_timestamp = squid_curtime;
+	/* Set the vary object state */
+	safe_free(http->entry->mem_obj->vary_headers);
+	if (r->vary_headers)
+	    http->entry->mem_obj->vary_headers = xstrdup(r->vary_headers);
+	safe_free(http->entry->mem_obj->vary_encoding);
+	if (strBuf(r->vary_encoding))
+	    http->entry->mem_obj->vary_encoding = xstrdup(strBuf(r->vary_encoding));
+	http->entry->mem_obj->request = requestLink(r);
+	EBIT_SET(http->entry->flags, KEY_EARLY_PUBLIC);
 	storeSetPublicKey(http->entry);
     }
     fwdStart(http->conn->fd, http->entry, r);
@@ -4984,6 +5005,10 @@
 	    /* Ouch.. we cannot handle this kind of variance */
 	    /* XXX This cannot really happen, but just to be complete */
 	    return VARY_CANCEL;
+	} else if (request->flags.collapsed) {
+	    /* This request was merged before we knew the outcome. Don't trust the response */
+	    /* restart vary processing from the beginning */
+	    return VARY_RESTART;
 	} else {
 	    return VARY_MATCH;
 	}
Index: squid/src/enums.h
===================================================================
RCS file: /cvsroot/squid/squid/src/enums.h,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -r1.234 -r1.235
--- squid/src/enums.h	19 Jul 2006 16:05:11 -0000	1.234
+++ squid/src/enums.h	30 Sep 2006 21:10:48 -0000	1.235
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.234 2006/07/19 16:05:11 hno Exp $
+ * $Id: enums.h,v 1.235 2006/09/30 21:10:48 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -528,10 +528,8 @@
     ENTRY_VALIDATED,
     ENTRY_BAD_LENGTH,
     ENTRY_ABORTED,
-    ENTRY_DEFER_READ
-#if UNUSED_CODE
-    ENTRY_DONT_LOG
-#endif
+    ENTRY_DEFER_READ,
+    KEY_EARLY_PUBLIC
 };
 
 typedef enum {
@@ -742,6 +740,7 @@
     VARY_NONE,
     VARY_MATCH,
     VARY_OTHER,
+    VARY_RESTART,
     VARY_CANCEL
 };
 
Index: squid/src/forward.c
===================================================================
RCS file: /cvsroot/squid/squid/src/forward.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- squid/src/forward.c	25 Aug 2006 12:26:07 -0000	1.116
+++ squid/src/forward.c	30 Sep 2006 21:10:48 -0000	1.117
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.c,v 1.116 2006/08/25 12:26:07 serassio Exp $
+ * $Id: forward.c,v 1.117 2006/09/30 21:10:48 hno Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -827,7 +827,8 @@
 	}
     }
     debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e));
-    e->mem_obj->request = requestLink(r);
+    if (!e->mem_obj->request)
+	e->mem_obj->request = requestLink(r);
 #if URL_CHECKSUM_DEBUG
     assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
 #endif
Index: squid/src/store.c
===================================================================
RCS file: /cvsroot/squid/squid/src/store.c,v
retrieving revision 1.566
retrieving revision 1.567
diff -u -r1.566 -r1.567
--- squid/src/store.c	16 Aug 2006 00:31:29 -0000	1.566
+++ squid/src/store.c	30 Sep 2006 21:10:48 -0000	1.567
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.c,v 1.566 2006/08/16 00:31:29 hno Exp $
+ * $Id: store.c,v 1.567 2006/09/30 21:10:48 hno Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -967,8 +967,14 @@
     StoreEntry *e2 = NULL;
     const cache_key *newkey;
     MemObject *mem = e->mem_obj;
-    if (e->hash.key && !EBIT_TEST(e->flags, KEY_PRIVATE))
-	return;			/* is already public */
+    if (e->hash.key && !EBIT_TEST(e->flags, KEY_PRIVATE)) {
+	if (EBIT_TEST(e->flags, KEY_EARLY_PUBLIC)) {
+	    EBIT_CLR(e->flags, KEY_EARLY_PUBLIC);
+	    storeSetPrivateKey(e);	/* wasn't really public yet, reset the key */
+	} else {
+	    return;		/* is already public */
+	}
+    }
     assert(mem);
     /*
      * We can't make RELEASE_REQUEST objects public.  Depending on
@@ -1010,7 +1016,7 @@
 	    }
 	}
 	newkey = storeKeyPublicByRequest(mem->request);
-	if (mem->vary_headers) {
+	if (mem->vary_headers && !EBIT_TEST(e->flags, KEY_EARLY_PUBLIC)) {
 	    String vary = StringNull;
 	    String varyhdr;
 	    varyhdr = httpHeaderGetList(&mem->reply->header, HDR_VARY);
@@ -1645,9 +1651,12 @@
     if (EBIT_TEST(e->flags, ENTRY_ABORTED))
 	return 0;
     /* Entries which seem to have got stuck is not valid to send to new clients */
-    if (e->store_status == STORE_PENDING)
+    if (e->store_status == STORE_PENDING) {
 	if (!e->mem_obj || e->mem_obj->refresh_timestamp + 30 < squid_curtime)
 	    return 0;
+	else
+	    return -1;
+    }
     return 1;
 }
 
Index: squid/src/structs.h
===================================================================
RCS file: /cvsroot/squid/squid/src/structs.h,v
retrieving revision 1.502
retrieving revision 1.503
diff -u -r1.502 -r1.503
--- squid/src/structs.h	21 Sep 2006 04:14:46 -0000	1.502
+++ squid/src/structs.h	30 Sep 2006 21:10:48 -0000	1.503
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.502 2006/09/21 04:14:46 swilton Exp $
+ * $Id: structs.h,v 1.503 2006/09/30 21:10:48 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -1822,6 +1822,7 @@
 #if LINUX_TPROXY
     unsigned int tproxy:1;
 #endif
+    unsigned int collapsed:1;	/* This request was collapsed. Don't trust the store entry to be valid */
 };
 
 struct _link_list {

squid-2.6.STABLE4-mem-leak-ncsa.patch:
 ncsa_auth.c |    5 +++++
 1 files changed, 5 insertions(+)

--- NEW FILE squid-2.6.STABLE4-mem-leak-ncsa.patch ---
---------------------
PatchSet 11045 
Date: 2006/09/30 21:25:01
Author: hno
Branch: HEAD
Tag: (none) 
Log:
Bug #1782: Memory leak in ncsa_auth on password changes

Members: 
	helpers/basic_auth/NCSA/ncsa_auth.c:1.7->1.8 

Index: squid/helpers/basic_auth/NCSA/ncsa_auth.c
===================================================================
RCS file: /cvsroot/squid/squid/helpers/basic_auth/NCSA/ncsa_auth.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- squid/helpers/basic_auth/NCSA/ncsa_auth.c	22 Sep 2006 02:18:00 -0000	1.7
+++ squid/helpers/basic_auth/NCSA/ncsa_auth.c	30 Sep 2006 21:25:01 -0000	1.8
@@ -73,6 +73,7 @@
     char *passwd;
     if (hash != NULL) {
 	hashFreeItems(hash, my_free);
+	hashFreeMemory(hash);
     }
     /* initial setup */
     hash = hash_create((HASHCMP *) strcmp, 7921, hash_string);
@@ -150,5 +151,9 @@
 	    printf("ERR Wrong password\n");
 	}
     }
+    if (hash != NULL) {
+	hashFreeItems(hash, my_free);
+	hashFreeMemory(hash);
+    }
     exit(0);
 }

squid-2.6.STABLE4-mem-leak.patch:
 client_side.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE squid-2.6.STABLE4-mem-leak.patch ---
---------------------
PatchSet 11043 
Date: 2006/09/30 21:05:37
Author: hno
Branch: HEAD
Tag: (none) 
Log:
Bug #1785: Memory leak in handling of negatively cached objects

Members: 
	src/client_side.c:1.678->1.679 

Index: squid/src/client_side.c
===================================================================
RCS file: /cvsroot/squid/squid/src/client_side.c,v
retrieving revision 1.678
retrieving revision 1.679
diff -u -r1.678 -r1.679
--- squid/src/client_side.c	22 Sep 2006 09:47:55 -0000	1.678
+++ squid/src/client_side.c	30 Sep 2006 21:05:37 -0000	1.679
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.c,v 1.678 2006/09/22 09:47:55 hno Exp $
+ * $Id: client_side.c,v 1.679 2006/09/30 21:05:37 hno Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -2180,6 +2180,7 @@
 	    http->log_type = LOG_TCP_NEGATIVE_HIT;
 	    clientSendMoreHeaderData(data, buf, size);
 	} else {
+	    memFree(buf, MEM_CLIENT_SOCK_BUF);
 	    http->log_type = LOG_TCP_MISS;
 	    clientProcessMiss(http);
 	}

squid-2.6.STABLE4-snmp.patch:
 configure.in |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--- NEW FILE squid-2.6.STABLE4-snmp.patch ---
---------------------
PatchSet 11039 
Date: 2006/09/26 18:03:37
Author: hno
Branch: HEAD
Tag: (none) 
Log:
Link Squid SNMP library as a .a library directly to avoid conflicts with
system libraries

Members: 
	configure.in:1.402->1.403 

Index: squid/configure.in
===================================================================
RCS file: /cvsroot/squid/squid/configure.in,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -r1.402 -r1.403
--- squid/configure.in	22 Sep 2006 11:10:14 -0000	1.402
+++ squid/configure.in	26 Sep 2006 18:03:37 -0000	1.403
@@ -1,7 +1,7 @@
 dnl
 dnl  Configuration input file for Squid
 dnl
-dnl  $Id: configure.in,v 1.402 2006/09/22 11:10:14 hno Exp $
+dnl  $Id: configure.in,v 1.403 2006/09/26 18:03:37 hno Exp $
 dnl
 dnl
 dnl
@@ -10,7 +10,7 @@
 AM_CONFIG_HEADER(include/autoconf.h)
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE
-AC_REVISION($Revision: 1.402 $)dnl
+AC_REVISION($Revision: 1.403 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -615,7 +615,7 @@
 [ if test "$enableval" = "yes" ; then
     echo "SNMP monitoring enabled"
     AC_DEFINE(SQUID_SNMP, 1, [Define to enable SNMP monitoring of Squid])
-    SNMPLIB='-L../snmplib -lsnmp'
+    SNMPLIB='../snmplib/libsnmp.a'
     AM_CONDITIONAL(USE_SNMP, true)
     SNMP_MAKEFILE=./snmplib/Makefile
     makesnmplib=snmplib

squid-2.6.STABLE4-syslog.patch:
 access_log.c |   57 ++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 36 insertions(+), 21 deletions(-)

--- NEW FILE squid-2.6.STABLE4-syslog.patch ---
---------------------
PatchSet 11041 
Date: 2006/09/28 21:55:37
Author: hno
Branch: HEAD
Tag: (none) 
Log:
Bug #1784: access_log syslog results in blanks syslog lines between every
access log entry.

workaround: define a custom log format.

Members: 
	src/access_log.c:1.92->1.93 

Index: squid/src/access_log.c
===================================================================
RCS file: /cvsroot/squid/squid/src/access_log.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- squid/src/access_log.c	2 Sep 2006 14:08:42 -0000	1.92
+++ squid/src/access_log.c	28 Sep 2006 21:55:37 -0000	1.93
@@ -1,6 +1,6 @@
 
 /*
- * $Id: access_log.c,v 1.92 2006/09/02 14:08:42 hno Exp $
+ * $Id: access_log.c,v 1.93 2006/09/28 21:55:37 hno Exp $
  *
  * DEBUG: section 46    Access Log
  * AUTHOR: Duane Wessels
@@ -1031,31 +1031,46 @@
 #endif
     if (user && !*user)
 	safe_free(user);
-    logfilePrintf(logfile, "%9ld.%03d %6d %s %s/%03d %" PRINTF_OFF_T " %s %s %s %s%s/%s %s",
-	(long int) current_time.tv_sec,
-	(int) current_time.tv_usec / 1000,
-	al->cache.msec,
-	client,
-	log_tags[al->cache.code],
-	al->http.code,
-	al->cache.size,
-	al->private.method_str,
-	al->url,
-	user ? user : dash_str,
-	al->hier.ping.timedout ? "TIMEOUT_" : "",
-	hier_strings[al->hier.code],
-	al->hier.host,
-	al->http.content_type);
-    safe_free(user);
-    if (Config.onoff.log_mime_hdrs) {
+    if (!Config.onoff.log_mime_hdrs) {
+	logfilePrintf(logfile, "%9ld.%03d %6d %s %s/%03d %" PRINTF_OFF_T " %s %s %s %s%s/%s %s\n",
+	    (long int) current_time.tv_sec,
+	    (int) current_time.tv_usec / 1000,
+	    al->cache.msec,
+	    client,
+	    log_tags[al->cache.code],
+	    al->http.code,
+	    al->cache.size,
+	    al->private.method_str,
+	    al->url,
+	    user ? user : dash_str,
+	    al->hier.ping.timedout ? "TIMEOUT_" : "",
+	    hier_strings[al->hier.code],
+	    al->hier.host,
+	    al->http.content_type);
+    } else {
 	char *ereq = log_quote(al->headers.request);
 	char *erep = log_quote(al->headers.reply);
-	logfilePrintf(logfile, " [%s] [%s]\n", ereq, erep);
+	logfilePrintf(logfile, "%9ld.%03d %6d %s %s/%03d %" PRINTF_OFF_T " %s %s %s %s%s/%s %s [%s] [%s]\n",
+	    (long int) current_time.tv_sec,
+	    (int) current_time.tv_usec / 1000,
+	    al->cache.msec,
+	    client,
+	    log_tags[al->cache.code],
+	    al->http.code,
+	    al->cache.size,
+	    al->private.method_str,
+	    al->url,
+	    user ? user : dash_str,
+	    al->hier.ping.timedout ? "TIMEOUT_" : "",
+	    hier_strings[al->hier.code],
+	    al->hier.host,
+	    al->http.content_type,
+	    ereq,
+	    erep);
 	safe_free(ereq);
 	safe_free(erep);
-    } else {
-	logfilePrintf(logfile, "\n");
     }
+    safe_free(user);
 }
 
 static void


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/squid/devel/.cvsignore,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- .cvsignore	21 Aug 2006 06:34:58 -0000	1.20
+++ .cvsignore	2 Oct 2006 10:13:18 -0000	1.21
@@ -5,3 +5,4 @@
 squid-2.5.STABLE13.tar.bz2
 squid-2.5.STABLE14.tar.bz2
 squid-2.6.STABLE3.tar.bz2
+squid-2.6.STABLE4.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/squid/devel/sources,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- sources	21 Aug 2006 06:34:58 -0000	1.22
+++ sources	2 Oct 2006 10:13:18 -0000	1.23
@@ -1 +1 @@
-5b181e9c08f35d098e53e54b01fbd092  squid-2.6.STABLE3.tar.bz2
+81ed6ff977dff6d76b0ad2b5390ebf89  squid-2.6.STABLE4.tar.bz2


Index: squid.spec
===================================================================
RCS file: /cvs/dist/rpms/squid/devel/squid.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- squid.spec	5 Sep 2006 07:20:38 -0000	1.73
+++ squid.spec	2 Oct 2006 10:13:18 -0000	1.74
@@ -4,8 +4,8 @@
 
 Summary: The Squid proxy caching server.
 Name: squid
-Version: 2.6.STABLE3
-Release: 2%{?dist}
+Version: 2.6.STABLE4
+Release: 1%{?dist}
 Epoch: 7
 License: GPL
 Group: System Environment/Daemons
@@ -19,10 +19,15 @@
 ## Source99: filter-requires-squid.sh
 
 # Upstream patches
-Patch101: squid-2.6.STABLE3-italian.patch
-Patch102: squid-2.6.STABLE3-acl-ports.patch
-Patch103: squid-2.6.STABLE3-acl-time.patch
-Patch104: squid-2.6.STABLE3-acl-time-2.patch
+Patch101: squid-2.6.STABLE4-compile.patch
+Patch102: squid-2.6.STABLE4-coss.patch
+Patch103: squid-2.6.STABLE4-coss-gcc.patch
+Patch104: squid-2.6.STABLE4-syslog.patch
+Patch105: squid-2.6.STABLE4-cache-peer.patch
+Patch106: squid-2.6.STABLE4-mem-leak.patch
+Patch107: squid-2.6.STABLE4-forward.patch
+Patch108: squid-2.6.STABLE4-snmp.patch
+Patch109: squid-2.6.STABLE4-mem-leak-ncsa.patch
 
 # External patches
 
@@ -63,6 +68,11 @@
 %patch102 -p1
 %patch103 -p1
 %patch104 -p1
+%patch105 -p1
+%patch106 -p1
+%patch107 -p1
+%patch108 -p1
+%patch109 -p1
 
 %patch201 -p1 -b .config
 %patch202 -p1 -b .location
@@ -333,6 +343,10 @@
     chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
 
 %changelog
+* Mon Oct 2 2006 Martin Stransky <stransky at redhat.com> - 7:2.6.STABLE4-1
+- new upstream
+- fixes from upstream bugzilla, items #1782,#1780,#1785,#1719,#1784,#1776
+
 * Tue Sep 5 2006 Martin Stransky <stransky at redhat.com> - 7:2.6.STABLE3-2
 - added upstream patches for ACL
 


--- squid-2.6.STABLE3-acl-ports.patch DELETED ---


--- squid-2.6.STABLE3-acl-time-2.patch DELETED ---


--- squid-2.6.STABLE3-acl-time.patch DELETED ---


--- squid-2.6.STABLE3-italian.patch DELETED ---




More information about the fedora-cvs-commits mailing list