diff -ruN squid-2.7.STABLE1/ChangeLog squid-2.7.STABLE2/ChangeLog
--- squid-2.7.STABLE1/ChangeLog 2008-05-27 02:44:17.000000000 +0200
+++ squid-2.7.STABLE2/ChangeLog 2008-05-31 23:23:33.000000000 +0200
@@ -1,3 +1,15 @@
+Changes to squid-2.7.STABLE2 (31 May 2008)
+
+ - Resolved merge conflict in Bug #219: Reassign delay pools after
+ reconfigure
+ - Back out incomplete patch for Bug #1893: Variant invalidation on
+ PURGE and HTCP CLR
+ - Bug #2350: Linux Capabilities version mismatch causing startup crash
+ on newer kernels
+ - Fix build error on Windows: in_addr_t is not available.
+ - Bug #2360: Move the SSL options before https_port so it gets
+ inherited proper
+
Changes to squid-2.7.STABLE1 (27 May 2008)
- General code tidyups of HTTP parser and related optimizations
diff -ruN squid-2.7.STABLE1/configure squid-2.7.STABLE2/configure
--- squid-2.7.STABLE1/configure 2008-05-27 02:51:07.000000000 +0200
+++ squid-2.7.STABLE2/configure 2008-05-31 23:25:30.000000000 +0200
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.in Revision: 1.430.2.6 .
+# From configure.in Revision: 1.430.2.7 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for Squid Web Proxy 2.7.STABLE1.
+# Generated by GNU Autoconf 2.61 for Squid Web Proxy 2.7.STABLE2.
#
# Report bugs to .
#
@@ -575,8 +575,8 @@
# Identity of this package.
PACKAGE_NAME='Squid Web Proxy'
PACKAGE_TARNAME='squid'
-PACKAGE_VERSION='2.7.STABLE1'
-PACKAGE_STRING='Squid Web Proxy 2.7.STABLE1'
+PACKAGE_VERSION='2.7.STABLE2'
+PACKAGE_STRING='Squid Web Proxy 2.7.STABLE2'
PACKAGE_BUGREPORT='http://www.squid-cache.org/bugs/'
ac_default_prefix=/usr/local/squid
@@ -1312,7 +1312,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Squid Web Proxy 2.7.STABLE1 to adapt to many kinds of systems.
+\`configure' configures Squid Web Proxy 2.7.STABLE2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1382,7 +1382,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Squid Web Proxy 2.7.STABLE1:";;
+ short | recursive ) echo "Configuration of Squid Web Proxy 2.7.STABLE2:";;
esac
cat <<\_ACEOF
@@ -1663,7 +1663,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Squid Web Proxy configure 2.7.STABLE1
+Squid Web Proxy configure 2.7.STABLE2
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1677,7 +1677,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Squid Web Proxy $as_me 2.7.STABLE1, which was
+It was created by Squid Web Proxy $as_me 2.7.STABLE2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2350,7 +2350,7 @@
# Define the identity of the package.
PACKAGE='squid'
- VERSION='2.7.STABLE1'
+ VERSION='2.7.STABLE2'
cat >>confdefs.h <<_ACEOF
@@ -27415,7 +27415,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Squid Web Proxy $as_me 2.7.STABLE1, which was
+This file was extended by Squid Web Proxy $as_me 2.7.STABLE2, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -27468,7 +27468,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-Squid Web Proxy config.status 2.7.STABLE1
+Squid Web Proxy config.status 2.7.STABLE2
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -ruN squid-2.7.STABLE1/configure.in squid-2.7.STABLE2/configure.in
--- squid-2.7.STABLE1/configure.in 2008-05-27 02:51:07.000000000 +0200
+++ squid-2.7.STABLE2/configure.in 2008-05-31 23:25:30.000000000 +0200
@@ -1,16 +1,16 @@
dnl
dnl Configuration input file for Squid
dnl
-dnl $Id: configure.in,v 1.430.2.6 2008/05/27 00:44:17 hno Exp $
+dnl $Id: configure.in,v 1.430.2.7 2008/05/31 21:23:33 hno Exp $
dnl
dnl
dnl
-AC_INIT(Squid Web Proxy, 2.7.STABLE1, http://www.squid-cache.org/bugs/, squid)
+AC_INIT(Squid Web Proxy, 2.7.STABLE2, http://www.squid-cache.org/bugs/, squid)
AC_PREREQ(2.52)
AM_CONFIG_HEADER(include/autoconf.h)
AC_CONFIG_AUX_DIR(cfgaux)
AM_INIT_AUTOMAKE
-AC_REVISION($Revision: 1.430.2.6 $)dnl
+AC_REVISION($Revision: 1.430.2.7 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
diff -ruN squid-2.7.STABLE1/include/squid_mswin.h squid-2.7.STABLE2/include/squid_mswin.h
--- squid-2.7.STABLE1/include/squid_mswin.h 2008-05-05 01:26:32.000000000 +0200
+++ squid-2.7.STABLE2/include/squid_mswin.h 2008-05-31 22:38:22.000000000 +0200
@@ -1,5 +1,5 @@
/*
- * $Id: squid_mswin.h,v 1.5.2.1 2008/05/04 23:26:32 hno Exp $
+ * $Id: squid_mswin.h,v 1.5.2.2 2008/05/31 20:38:22 hno Exp $
*
* AUTHOR: Andrey Shorin
* AUTHOR: Guido Serassio
@@ -167,6 +167,7 @@
typedef unsigned short in_port_t;
typedef unsigned short int ushort;
+typedef unsigned int in_addr_t;
typedef int uid_t;
typedef int gid_t;
diff -ruN squid-2.7.STABLE1/include/version.h squid-2.7.STABLE2/include/version.h
--- squid-2.7.STABLE1/include/version.h 2008-05-27 02:51:07.000000000 +0200
+++ squid-2.7.STABLE2/include/version.h 2008-05-31 23:25:30.000000000 +0200
@@ -9,5 +9,5 @@
*/
#ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1211849459
+#define SQUID_RELEASE_TIME 1212269126
#endif
diff -ruN squid-2.7.STABLE1/RELEASENOTES.html squid-2.7.STABLE2/RELEASENOTES.html
--- squid-2.7.STABLE1/RELEASENOTES.html 2008-05-27 02:52:20.000000000 +0200
+++ squid-2.7.STABLE2/RELEASENOTES.html 2008-05-31 23:26:02.000000000 +0200
@@ -2,12 +2,12 @@
- Squid 2.7.STABLE1 release notes
+ Squid 2.7.STABLE2 release notes
-Squid 2.7.STABLE1 release notes
+Squid 2.7.STABLE2 release notes
-Squid Developers
$Id: release.html,v 1.1.2.3 2008/05/27 00:10:23 hno Exp $
+Squid Developers
$Id: release.html,v 1.1.2.4 2008/05/31 21:23:33 hno Exp $
This document contains the release notes for version 2.7 of Squid.
Squid is a WWW Cache application developed by the Web Caching community.
@@ -41,6 +41,9 @@
4.5 Known Limitations:
4.6 Using cache manager on Windows:
+
+
+
@@ -320,6 +323,7 @@
- It's recommended to use '/' char in Squid paths instead of '\'
- Paths with spaces (like 'C:\Programs Files\Squid) are NOT supported by Squid
+- Include wildcard patterns in squid.conf are NOT supported on Windows
- When using ACL like 'acl aclname acltype "file"' the file must be in DOS text
format (CR+LF) and the full Windows path must be specified, for example:
@@ -394,5 +398,18 @@
+
+
+
+
+- Compile error if --enable-delaypools used
+- Bug #1893: Variant invalidation support removed again, caused a lot content to not get cached.
+- Bug #2350: Linux Capabilities version mismatch causing startup crash on newer kernels
+- See also the list of
+squid-2.7.STABLE2 changes and the
+ChangeLog file for details.
+
+
+
diff -ruN squid-2.7.STABLE1/src/cf.data.pre squid-2.7.STABLE2/src/cf.data.pre
--- squid-2.7.STABLE1/src/cf.data.pre 2008-05-27 00:49:36.000000000 +0200
+++ squid-2.7.STABLE2/src/cf.data.pre 2008-05-31 22:49:45.000000000 +0200
@@ -1,6 +1,6 @@
#
-# $Id: cf.data.pre,v 1.450.2.19 2008/05/26 22:49:36 hno Exp $
+# $Id: cf.data.pre,v 1.450.2.20 2008/05/31 20:49:45 hno Exp $
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
# ----------------------------------------------------------
@@ -1004,6 +1004,121 @@
DOC_END
COMMENT_START
+ SSL OPTIONS
+ -----------------------------------------------------------------------------
+COMMENT_END
+
+NAME: ssl_unclean_shutdown
+IFDEF: USE_SSL
+TYPE: onoff
+DEFAULT: off
+LOC: Config.SSL.unclean_shutdown
+DOC_START
+ Some browsers (especially MSIE) bugs out on SSL shutdown
+ messages.
+DOC_END
+
+NAME: ssl_engine
+IFDEF: USE_SSL
+TYPE: string
+LOC: Config.SSL.ssl_engine
+DEFAULT: none
+DOC_START
+ The OpenSSL engine to use. You will need to set this if you
+ would like to use hardware SSL acceleration for example.
+DOC_END
+
+NAME: sslproxy_client_certificate
+IFDEF: USE_SSL
+DEFAULT: none
+LOC: Config.ssl_client.cert
+TYPE: string
+DOC_START
+ Client SSL Certificate to use when proxying https:// URLs
+DOC_END
+
+NAME: sslproxy_client_key
+IFDEF: USE_SSL
+DEFAULT: none
+LOC: Config.ssl_client.key
+TYPE: string
+DOC_START
+ Client SSL Key to use when proxying https:// URLs
+DOC_END
+
+NAME: sslproxy_version
+IFDEF: USE_SSL
+DEFAULT: 1
+LOC: Config.ssl_client.version
+TYPE: int
+DOC_START
+ SSL version level to use when proxying https:// URLs
+DOC_END
+
+NAME: sslproxy_options
+IFDEF: USE_SSL
+DEFAULT: none
+LOC: Config.ssl_client.options
+TYPE: string
+DOC_START
+ SSL engine options to use when proxying https:// URLs
+DOC_END
+
+NAME: sslproxy_cipher
+IFDEF: USE_SSL
+DEFAULT: none
+LOC: Config.ssl_client.cipher
+TYPE: string
+DOC_START
+ SSL cipher list to use when proxying https:// URLs
+DOC_END
+
+NAME: sslproxy_cafile
+IFDEF: USE_SSL
+DEFAULT: none
+LOC: Config.ssl_client.cafile
+TYPE: string
+DOC_START
+ file containing CA certificates to use when verifying server
+ certificates while proxying https:// URLs
+DOC_END
+
+NAME: sslproxy_capath
+IFDEF: USE_SSL
+DEFAULT: none
+LOC: Config.ssl_client.capath
+TYPE: string
+DOC_START
+ directory containing CA certificates to use when verifying
+ server certificates while proxying https:// URLs
+DOC_END
+
+NAME: sslproxy_flags
+IFDEF: USE_SSL
+DEFAULT: none
+LOC: Config.ssl_client.flags
+TYPE: string
+DOC_START
+ Various flags modifying the use of SSL while proxying https:// URLs:
+ DONT_VERIFY_PEER Accept certificates even if they fail to
+ verify.
+ NO_DEFAULT_CA Don't use the default CA list built in
+ to OpenSSL.
+DOC_END
+
+NAME: sslpassword_program
+IFDEF: USE_SSL
+DEFAULT: none
+LOC: Config.Program.ssl_password
+TYPE: string
+DOC_START
+ Specify a program used for entering SSL key passphrases
+ when using encrypted SSL certificate keys. If not specified
+ keys must either be unencrypted, or Squid started with the -N
+ option to allow it to query interactively for the passphrase.
+DOC_END
+
+COMMENT_START
NETWORK OPTIONS
-----------------------------------------------------------------------------
COMMENT_END
@@ -1316,121 +1431,6 @@
DOC_END
COMMENT_START
- SSL OPTIONS
- -----------------------------------------------------------------------------
-COMMENT_END
-
-NAME: ssl_unclean_shutdown
-IFDEF: USE_SSL
-TYPE: onoff
-DEFAULT: off
-LOC: Config.SSL.unclean_shutdown
-DOC_START
- Some browsers (especially MSIE) bugs out on SSL shutdown
- messages.
-DOC_END
-
-NAME: ssl_engine
-IFDEF: USE_SSL
-TYPE: string
-LOC: Config.SSL.ssl_engine
-DEFAULT: none
-DOC_START
- The OpenSSL engine to use. You will need to set this if you
- would like to use hardware SSL acceleration for example.
-DOC_END
-
-NAME: sslproxy_client_certificate
-IFDEF: USE_SSL
-DEFAULT: none
-LOC: Config.ssl_client.cert
-TYPE: string
-DOC_START
- Client SSL Certificate to use when proxying https:// URLs
-DOC_END
-
-NAME: sslproxy_client_key
-IFDEF: USE_SSL
-DEFAULT: none
-LOC: Config.ssl_client.key
-TYPE: string
-DOC_START
- Client SSL Key to use when proxying https:// URLs
-DOC_END
-
-NAME: sslproxy_version
-IFDEF: USE_SSL
-DEFAULT: 1
-LOC: Config.ssl_client.version
-TYPE: int
-DOC_START
- SSL version level to use when proxying https:// URLs
-DOC_END
-
-NAME: sslproxy_options
-IFDEF: USE_SSL
-DEFAULT: none
-LOC: Config.ssl_client.options
-TYPE: string
-DOC_START
- SSL engine options to use when proxying https:// URLs
-DOC_END
-
-NAME: sslproxy_cipher
-IFDEF: USE_SSL
-DEFAULT: none
-LOC: Config.ssl_client.cipher
-TYPE: string
-DOC_START
- SSL cipher list to use when proxying https:// URLs
-DOC_END
-
-NAME: sslproxy_cafile
-IFDEF: USE_SSL
-DEFAULT: none
-LOC: Config.ssl_client.cafile
-TYPE: string
-DOC_START
- file containing CA certificates to use when verifying server
- certificates while proxying https:// URLs
-DOC_END
-
-NAME: sslproxy_capath
-IFDEF: USE_SSL
-DEFAULT: none
-LOC: Config.ssl_client.capath
-TYPE: string
-DOC_START
- directory containing CA certificates to use when verifying
- server certificates while proxying https:// URLs
-DOC_END
-
-NAME: sslproxy_flags
-IFDEF: USE_SSL
-DEFAULT: none
-LOC: Config.ssl_client.flags
-TYPE: string
-DOC_START
- Various flags modifying the use of SSL while proxying https:// URLs:
- DONT_VERIFY_PEER Accept certificates even if they fail to
- verify.
- NO_DEFAULT_CA Don't use the default CA list built in
- to OpenSSL.
-DOC_END
-
-NAME: sslpassword_program
-IFDEF: USE_SSL
-DEFAULT: none
-LOC: Config.Program.ssl_password
-TYPE: string
-DOC_START
- Specify a program used for entering SSL key passphrases
- when using encrypted SSL certificate keys. If not specified
- keys must either be unencrypted, or Squid started with the -N
- option to allow it to query interactively for the passphrase.
-DOC_END
-
-COMMENT_START
OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
-----------------------------------------------------------------------------
COMMENT_END
diff -ruN squid-2.7.STABLE1/src/client_side.c squid-2.7.STABLE2/src/client_side.c
--- squid-2.7.STABLE1/src/client_side.c 2008-05-27 01:14:30.000000000 +0200
+++ squid-2.7.STABLE2/src/client_side.c 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: client_side.c,v 1.754.2.12 2008/05/26 23:14:30 hno Exp $
+ * $Id: client_side.c,v 1.754.2.14 2008/05/27 12:49:39 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
@@ -2311,16 +2311,6 @@
http->sc = NULL;
clientProcessMiss(http);
return;
- case VARY_EXPIRED:
- /* Variant is expired. Delete it and process as a miss. */
- debug(33, 2) ("clientCacheHit: Variant expired, deleting\n");
- storeClientUnregister(http->sc, e, http);
- http->sc = NULL;
- storeRelease(e);
- storeUnlockObject(e);
- http->entry = NULL;
- clientProcessMiss(http);
- return;
}
if (r->method == METHOD_PURGE) {
http->entry = NULL;
@@ -5051,8 +5041,6 @@
*/
vary = httpMakeVaryMark(request, entry->mem_obj->reply);
if (vary) {
- /* Save the vary_id for the second time through. */
- request->vary_id = entry->mem_obj->vary_id;
return VARY_OTHER;
} else {
/* Ouch.. we cannot handle this kind of variance */
@@ -5070,13 +5058,6 @@
/* This request was merged before we knew the outcome. Don't trust the response */
/* restart vary processing from the beginning */
return VARY_RESTART;
- } else if (request->vary_id.create_time != entry->mem_obj->vary_id.create_time ||
- request->vary_id.serial != entry->mem_obj->vary_id.serial) {
- /* vary_id mismatch, the variant must be expired */
- debug(33, 3) ("varyEvaluateMatch: vary ID mismatch, parent is %ld.%u, child is %ld.%u\n",
- request->vary_id.create_time, request->vary_id.serial,
- entry->mem_obj->vary_id.create_time, entry->mem_obj->vary_id.serial);
- return VARY_EXPIRED;
} else {
return VARY_MATCH;
}
@@ -5183,10 +5164,6 @@
assert(http);
if (http->sc && http->log_type != LOG_TCP_DENIED && http->log_type != LOG_TAG_NONE)
delaySetStoreClient(http->sc, delayClient(http));
- if (http->reply)
- http->delayMaxBodySize = 0;
- http->delayAssignedPool = 0;
- clientDelayMaxBodySize(http->request, http, http->reply);
}
}
#endif
diff -ruN squid-2.7.STABLE1/src/comm_generic.c squid-2.7.STABLE2/src/comm_generic.c
--- squid-2.7.STABLE1/src/comm_generic.c 2008-03-18 03:49:30.000000000 +0100
+++ squid-2.7.STABLE2/src/comm_generic.c 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: comm_generic.c,v 1.10.2.1 2008/03/18 02:49:30 hno Exp $
+ * $Id: comm_generic.c,v 1.10.2.2 2008/05/27 12:49:39 hno Exp $
*
* DEBUG: section 5 Socket Functions
*
@@ -360,7 +360,7 @@
int rc;
double start = current_dtime;
- debug(5, 5) ("comm_select: timeout %d\n", msec);
+ debug(5, 3) ("comm_select: timeout %d\n", msec);
if (msec > MAX_POLL_TIME)
msec = MAX_POLL_TIME;
diff -ruN squid-2.7.STABLE1/src/enums.h squid-2.7.STABLE2/src/enums.h
--- squid-2.7.STABLE1/src/enums.h 2008-01-22 15:36:46.000000000 +0100
+++ squid-2.7.STABLE2/src/enums.h 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: enums.h,v 1.245.2.1 2008/01/22 14:36:46 hno Exp $
+ * $Id: enums.h,v 1.245.2.2 2008/05/27 12:49:39 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -661,7 +661,6 @@
STORE_META_STD_LFS, /* standard metadata in lfs format */
STORE_META_OBJSIZE, /* object size, if its known */
STORE_META_STOREURL, /* the store url, if different to the normal URL */
- STORE_META_VARY_ID, /* Unique ID linking variants */
STORE_META_END
};
@@ -755,8 +754,7 @@
VARY_MATCH,
VARY_OTHER,
VARY_RESTART,
- VARY_CANCEL,
- VARY_EXPIRED
+ VARY_CANCEL
};
/* Windows Port */
diff -ruN squid-2.7.STABLE1/src/http.c squid-2.7.STABLE2/src/http.c
--- squid-2.7.STABLE1/src/http.c 2008-05-27 00:47:40.000000000 +0200
+++ squid-2.7.STABLE2/src/http.c 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: http.c,v 1.439.2.3 2008/05/26 22:47:40 hno Exp $
+ * $Id: http.c,v 1.439.2.4 2008/05/27 12:49:39 hno Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
@@ -229,7 +229,7 @@
const char *v;
#if HTTP_VIOLATIONS
const refresh_t *R = NULL;
- /* This strange looking define first looks up the refresh pattern
+ /* This strange looking define first looks up the frefresh pattern
* and then checks if the specified flag is set. The main purpose
* of this is to simplify the refresh pattern lookup
*/
diff -ruN squid-2.7.STABLE1/src/protos.h squid-2.7.STABLE2/src/protos.h
--- squid-2.7.STABLE1/src/protos.h 2008-05-27 01:14:30.000000000 +0200
+++ squid-2.7.STABLE2/src/protos.h 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: protos.h,v 1.547.2.6 2008/05/26 23:14:30 hno Exp $
+ * $Id: protos.h,v 1.547.2.7 2008/05/27 12:49:39 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -1465,7 +1465,7 @@
/* ETag support */
void storeLocateVaryDone(VaryData * data);
void storeLocateVary(StoreEntry * e, int offset, const char *vary_data, String accept_encoding, STLVCB * callback, void *cbdata);
-vary_id_t storeAddVary(const char *url, const method_t method, const cache_key * key, const char *etag, const char *vary, const char *vary_headers, const char *accept_encoding);
+void storeAddVary(const char *url, const method_t method, const cache_key * key, const char *etag, const char *vary, const char *vary_headers, const char *accept_encoding);
/* New HTTP message parsing support */
extern void HttpMsgBufInit(HttpMsgBuf * hmsg, const char *buf, size_t size);
diff -ruN squid-2.7.STABLE1/src/store.c squid-2.7.STABLE2/src/store.c
--- squid-2.7.STABLE1/src/store.c 2008-05-05 01:23:13.000000000 +0200
+++ squid-2.7.STABLE2/src/store.c 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: store.c,v 1.584.2.2 2008/05/04 23:23:13 hno Exp $
+ * $Id: store.c,v 1.584.2.3 2008/05/27 12:49:39 hno Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
@@ -87,7 +87,6 @@
static void storeEntryDereferenced(StoreEntry *);
static int getKeyCounter(void);
static int storeKeepInMemory(const StoreEntry *);
-static void initVaryId(vary_id_t *);
static OBJH storeCheckCachableStats;
static EVH storeLateRelease;
@@ -348,9 +347,8 @@
StoreEntry *
storeGet(const cache_key * key)
{
- StoreEntry *e = (StoreEntry *) hash_lookup(store_table, key);
- debug(20, 3) ("storeGet: %s -> %p\n", storeKeyText(key), e);
- return e;
+ debug(20, 3) ("storeGet: looking up %s\n", storeKeyText(key));
+ return (StoreEntry *) hash_lookup(store_table, key);
}
StoreEntry *
@@ -454,11 +452,6 @@
storeAppendPrintf(state->e, "ETag: %s\n", state->etag);
storeAppendPrintf(state->e, "VaryData: %s\n", state->vary_headers);
}
- if (state->oe) {
- debug(11, 3) ("free_AddVaryState: copying vary ID %ld.%u to new entry\n",
- state->oe->mem_obj->vary_id.create_time, state->oe->mem_obj->vary_id.serial);
- state->e->mem_obj->vary_id = state->oe->mem_obj->vary_id;
- }
storeTimestampsSet(state->e);
storeComplete(state->e);
storeTimestampsSet(state->e);
@@ -570,7 +563,6 @@
debug(11, 3) ("storeAddVaryReadOld: %p seen_offset=%" PRINTF_OFF_T " buf_offset=%d size=%d\n", data, state->seen_offset, (int) state->buf_offset, (int) size);
if (size <= 0) {
debug(11, 2) ("storeAddVaryReadOld: DONE\n");
- /* Call back to the destructor free_AddVaryState */
cbdataFree(state);
return;
}
@@ -714,14 +706,12 @@
/*
* Adds/updates a Vary record.
- * At least one of key or etag must be specified, preferably both.
- * Returns the vary ID if it can be determined immediately, zero otherwise
+ * For updates only one of key or etag needs to be specified
+ * At leas one of key or etag must be specified, preferably both.
*/
-vary_id_t
+void
storeAddVary(const char *url, const method_t method, const cache_key * key, const char *etag, const char *vary, const char *vary_headers, const char *accept_encoding)
{
- vary_id_t vary_id =
- {0, 0};
AddVaryState *state;
request_flags flags = null_request_flags;
CBDATA_INIT_TYPE_FREECB(AddVaryState, free_AddVaryState);
@@ -743,11 +733,6 @@
state->e = storeCreateEntry(url, flags, method);
httpReplySetHeaders(state->e->mem_obj->reply, HTTP_OK, "Internal marker object", "x-squid-internal/vary", -1, -1, squid_curtime + 100000);
httpHeaderPutStr(&state->e->mem_obj->reply->header, HDR_VARY, vary);
- if (!state->oe) {
- /* New entry, create new unique ID */
- initVaryId(&vary_id);
- state->e->mem_obj->vary_id = vary_id;
- }
storeSetPublicKey(state->e);
storeBuffer(state->e);
httpReplySwapOut(state->e->mem_obj->reply, state->e);
@@ -766,10 +751,8 @@
* - VaryData is added last in the Key record it corresponds to (after
* modifications above)
*/
- if (state->oe->mem_obj) {
- vary_id = state->oe->mem_obj->vary_id;
- } else {
- /* Swap in the dummy Vary object. vary_id is unknown for now */
+ /* Swap in the dummy Vary object */
+ if (!state->oe->mem_obj) {
storeCreateMemObject(state->oe, state->url);
state->oe->mem_obj->method = method;
}
@@ -781,10 +764,10 @@
state->buf,
storeAddVaryReadOld,
state);
+ return;
} else {
cbdataFree(state);
}
- return vary_id;
}
static MemPool *VaryData_pool = NULL;
@@ -827,10 +810,9 @@
static void
storeLocateVaryCallback(LocateVaryState * state)
{
- int expired = FALSE;
if (cbdataValid(state->callback_data)) {
VaryData *data = state->data;
- if (!expired && (data->key || data->etags.count)) {
+ if (data->key || data->etags.count) {
state->callback(data, state->callback_data);
state->data = NULL; /* now owned by the caller */
} else {
@@ -1007,7 +989,6 @@
StoreEntry *e2 = NULL;
const cache_key *newkey;
MemObject *mem = e->mem_obj;
- debug(20, 3) ("storeSetPublicKey: %s\n", storeKeyText(e->hash.key));
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);
@@ -1061,7 +1042,6 @@
newkey = storeKeyPublicByRequest(mem->request);
if (mem->vary_headers && !EBIT_TEST(e->flags, KEY_EARLY_PUBLIC)) {
String vary = StringNull;
- vary_id_t vary_id;
String varyhdr;
varyhdr = httpHeaderGetList(&mem->reply->header, HDR_VARY);
if (strBuf(varyhdr))
@@ -1074,26 +1054,7 @@
strListAdd(&vary, strBuf(varyhdr), ',');
stringClean(&varyhdr);
#endif
- /* Create or update the vary object */
- vary_id = storeAddVary(mem->url, mem->method, newkey, httpHeaderGetStr(&mem->reply->header, HDR_ETAG), strBuf(vary), mem->vary_headers, mem->vary_encoding);
- if (vary_id.create_time) {
- mem->vary_id = vary_id;
- } else {
- /* Base vary object is not swapped in, so the vary_id is unknown.
- * Maybe we can cheat and use the vary_id from the request. If the
- * base object existed earlier in the request, it would have been
- * swapped in and stored at that time.
- */
- if (mem->request->vary_id.create_time) {
- mem->vary_id = mem->request->vary_id;
- } else {
- /* Nope, no luck. Store with zero vary_id, which will immediately
- * be treated as expired.
- * FIXME: make this work properly.
- */
- debug(20, 1) ("storeSetPublicKey: unable to determine vary_id for '%s'\n", mem->url);
- }
- }
+ storeAddVary(mem->url, mem->method, newkey, httpHeaderGetStr(&mem->reply->header, HDR_ETAG), strBuf(vary), mem->vary_headers, mem->vary_encoding);
stringClean(&vary);
}
} else {
@@ -1838,8 +1799,6 @@
debug(20, 1) ("MemObject->url: %p %s\n",
mem->url,
checkNullString(mem->url));
- debug(20, 1) ("MemObject->vary_id: %ld.%u\n",
- mem->vary_id.create_time, mem->vary_id.serial);
}
void
@@ -2123,15 +2082,3 @@
if (e->mem_obj)
e->mem_obj->serverfd = -1;
}
-
-/* Initialise the vary_id with a new unique value */
-static void
-initVaryId(vary_id_t * vary_id)
-{
- static unsigned int serial = 0;
-
- debug(20, 3) ("initVaryId: Initialising vary_id to %ld.%u\n",
- squid_curtime, serial);
- vary_id->create_time = squid_curtime;
- vary_id->serial = serial++;
-}
diff -ruN squid-2.7.STABLE1/src/store_client.c squid-2.7.STABLE2/src/store_client.c
--- squid-2.7.STABLE1/src/store_client.c 2008-01-14 04:26:41.000000000 +0100
+++ squid-2.7.STABLE2/src/store_client.c 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: store_client.c,v 1.127.2.2 2008/01/14 03:26:41 adrian Exp $
+ * $Id: store_client.c,v 1.127.2.3 2008/05/27 12:49:39 hno Exp $
*
* DEBUG: section 20 Storage Manager Client-Side Interface
* AUTHOR: Duane Wessels
@@ -442,9 +442,6 @@
mem->vary_headers = xstrdup(t->value);
}
break;
- case STORE_META_VARY_ID:
- memcpy(&mem->vary_id, t->value, sizeof(vary_id_t));
- break;
default:
debug(20, 2) ("WARNING: got unused STORE_META type %d\n", t->type);
break;
diff -ruN squid-2.7.STABLE1/src/store_swapmeta.c squid-2.7.STABLE2/src/store_swapmeta.c
--- squid-2.7.STABLE1/src/store_swapmeta.c 2008-01-02 16:49:31.000000000 +0100
+++ squid-2.7.STABLE2/src/store_swapmeta.c 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: store_swapmeta.c,v 1.23.2.1 2008/01/02 15:49:31 hno Exp $
+ * $Id: store_swapmeta.c,v 1.23.2.2 2008/05/27 12:49:39 hno Exp $
*
* DEBUG: section 20 Storage Manager Swapfile Metadata
* AUTHOR: Kostas Anagnostakis
@@ -88,7 +88,6 @@
T = storeSwapTLVAdd(STORE_META_VARY_HEADERS, vary, strlen(vary) + 1, T);
if (e->mem_obj->store_url)
T = storeSwapTLVAdd(STORE_META_STOREURL, e->mem_obj->store_url, strlen(e->mem_obj->store_url) + 1, T);
- storeSwapTLVAdd(STORE_META_VARY_ID, &e->mem_obj->vary_id, sizeof(vary_id_t), T);
return TLV;
}
diff -ruN squid-2.7.STABLE1/src/structs.h squid-2.7.STABLE2/src/structs.h
--- squid-2.7.STABLE1/src/structs.h 2008-04-21 04:49:44.000000000 +0200
+++ squid-2.7.STABLE2/src/structs.h 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: structs.h,v 1.538.2.11 2008/04/21 02:49:44 hno Exp $
+ * $Id: structs.h,v 1.538.2.12 2008/05/27 12:49:39 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -1730,11 +1730,6 @@
void (*Done) (RemovalPurgeWalker * walker);
};
-struct _vary_id_t {
- time_t create_time;
- unsigned int serial;
-};
-
/* This structure can be freed while object is purged out from memory */
struct _MemObject {
method_t method;
@@ -1775,7 +1770,6 @@
StoreEntry *old_entry;
time_t refresh_timestamp;
time_t stale_while_revalidate;
- vary_id_t vary_id;
};
struct _StoreEntry {
@@ -1958,7 +1952,6 @@
char *vary_headers; /* Used when varying entities are detected. Changes how the store key is calculated */
String vary_encoding; /* Used when varying entities are detected. Changes how the store key is calculated. */
VaryData *vary;
- vary_id_t vary_id; /* Vary ID of the parent vary object */
Array *etags; /* possible known entity tags (Vary MISS) */
char *etag; /* current entity tag, cache validation */
unsigned int done_etag:1; /* We have done clientProcessETag on this, don't attempt it again */
diff -ruN squid-2.7.STABLE1/src/tools.c squid-2.7.STABLE2/src/tools.c
--- squid-2.7.STABLE1/src/tools.c 2008-05-27 00:48:11.000000000 +0200
+++ squid-2.7.STABLE2/src/tools.c 2008-05-31 22:37:22.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: tools.c,v 1.260.2.3 2008/05/26 22:48:11 hno Exp $
+ * $Id: tools.c,v 1.260.2.4 2008/05/31 20:37:22 hno Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
@@ -1358,15 +1358,18 @@
restoreCapabilities(int keep)
{
#if defined(_SQUID_LINUX_) && HAVE_SYS_CAPABILITY_H
+#ifndef _LINUX_CAPABILITY_VERSION_1
+#define _LINUX_CAPABILITY_VERSION_1 _LINUX_CAPABILITY_VERSION
+#endif
cap_user_header_t head = xcalloc(1, sizeof(*head));
cap_user_data_t cap = xcalloc(1, sizeof(*cap));
- head->version = _LINUX_CAPABILITY_VERSION;
+ head->version = _LINUX_CAPABILITY_VERSION_1;
if (capget(head, cap) != 0) {
debug(50, 1) ("Can't get current capabilities\n");
goto nocap;
}
- if (head->version != _LINUX_CAPABILITY_VERSION) {
+ if (head->version != _LINUX_CAPABILITY_VERSION_1) {
debug(50, 1) ("Invalid capability version %d (expected %d)\n", head->version, _LINUX_CAPABILITY_VERSION);
goto nocap;
}
diff -ruN squid-2.7.STABLE1/src/typedefs.h squid-2.7.STABLE2/src/typedefs.h
--- squid-2.7.STABLE1/src/typedefs.h 2007-12-14 21:05:24.000000000 +0100
+++ squid-2.7.STABLE2/src/typedefs.h 2008-05-27 14:49:39.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * $Id: typedefs.h,v 1.157 2007/12/14 20:05:24 hno Exp $
+ * $Id: typedefs.h,v 1.157.2.1 2008/05/27 12:49:39 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -226,7 +226,6 @@
typedef struct _RemovalPolicySettings RemovalPolicySettings;
typedef struct _errormap errormap;
typedef struct _PeerMonitor PeerMonitor;
-typedef struct _vary_id_t vary_id_t;
typedef struct _http_version_t http_version_t;