summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorjdolecek <jdolecek@pkgsrc.org>2000-11-02 10:31:38 +0000
committerjdolecek <jdolecek@pkgsrc.org>2000-11-02 10:31:38 +0000
commitdc177a8d19b70d52a9846ebe190f1014435ea2ec (patch)
treed66e73d2b6980eb952ecd668d5a65ce894e3196e /www
parent8053b25f397e3c71d87da3f182ef915cb2590c76 (diff)
downloadpkgsrc-dc177a8d19b70d52a9846ebe190f1014435ea2ec.tar.gz
add log_mime_hdrs_list directive - this directive specifies list of
headers to log into access log when log_mime_hdrs is on the change will be sent to Squid maintainers for possible future inclusion shortly
Diffstat (limited to 'www')
-rw-r--r--www/squid/Makefile4
-rw-r--r--www/squid/files/patch-sum5
-rw-r--r--www/squid/patches/patch-aj64
-rw-r--r--www/squid/patches/patch-ak26
-rw-r--r--www/squid/patches/patch-al12
5 files changed, 108 insertions, 3 deletions
diff --git a/www/squid/Makefile b/www/squid/Makefile
index 75837481d3d..cc5f633927d 100644
--- a/www/squid/Makefile
+++ b/www/squid/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.34 2000/10/15 20:17:44 veego Exp $
+# $NetBSD: Makefile,v 1.35 2000/11/02 10:31:38 jdolecek Exp $
DISTNAME= squid-2.3.STABLE4-src
-PKGNAME= squid-2.3s4
+PKGNAME= squid-2.3s4nb1
CATEGORIES= www
MASTER_SITES= \
http://www.squid-cache.org/Versions/v2/2.3/ \
diff --git a/www/squid/files/patch-sum b/www/squid/files/patch-sum
index 5150bfc8b47..4dbabd3b72b 100644
--- a/www/squid/files/patch-sum
+++ b/www/squid/files/patch-sum
@@ -1,4 +1,4 @@
-$NetBSD: patch-sum,v 1.7 2000/10/15 20:17:46 veego Exp $
+$NetBSD: patch-sum,v 1.8 2000/11/02 10:31:39 jdolecek Exp $
MD5 (patch-aa) = 6befb071002fb7ced0fb9f388d039cd9
MD5 (patch-ab) = 05ef29847c539ee53d056061ab21ebcf
@@ -9,3 +9,6 @@ MD5 (patch-af) = ec14792120b479d910a2a9f2f183564c
MD5 (patch-ag) = c29b4cd5e47bcd56c8b63c97ddd135b2
MD5 (patch-ah) = 971f5268e79bd6a7b266baa3e5b87ca0
MD5 (patch-ai) = f4e4dbed017331c46df688543c98fec8
+MD5 (patch-aj) = a1064c9dd89fd7a79fbafa2abb09004c
+MD5 (patch-ak) = dfb245314da1c2ef7a6113619540fdf7
+MD5 (patch-al) = 9eabffdbdc2f57aa159d15d83b064e59
diff --git a/www/squid/patches/patch-aj b/www/squid/patches/patch-aj
new file mode 100644
index 00000000000..e791c1a589f
--- /dev/null
+++ b/www/squid/patches/patch-aj
@@ -0,0 +1,64 @@
+$NetBSD: patch-aj,v 1.3 2000/11/02 10:31:39 jdolecek Exp $
+
+--- access_log.c.orig Thu Nov 2 10:00:04 2000
++++ access_log.c Thu Nov 2 11:06:28 2000
+@@ -122,6 +122,8 @@ log_quote(const char *header)
+ {
+ int c;
+ int i;
++ int log_all, check_name, log_this;
++ const struct _wordlist *wl;
+ char *buf;
+ char *buf_cursor;
+ if (header == NULL) {
+@@ -131,13 +133,41 @@ log_quote(const char *header)
+ }
+ buf = xcalloc((strlen(header) * 3) + 1, 1);
+ buf_cursor = buf;
++
++ /* if empty or first keyword is "all", log all mime headers */
++ log_all = (!Config.log_mime_hdrs_list
++ || strcasecmp(Config.log_mime_hdrs_list->key, "all") == 0);
++
+ /*
+ * We escape: \x00-\x1F"#%;<>?{}|\\\\^~`\[\]\x7F-\xFF
+ * which is the default escape list for the CPAN Perl5 URI module
+ * modulo the inclusion of space (x40) to make the raw logs a bit
+ * more readable.
+ */
+- while ((c = *(const unsigned char *) header++) != '\0') {
++ check_name = 1;
++ log_this = 1;
++ for(; (c = *(const unsigned char *) header) != '\0'; header++) {
++ if (!log_all && check_name) {
++ /* loop over configured header names and only continue
++ * if the current header is on the list */
++ wl = Config.log_mime_hdrs_list;
++ log_this = 0;
++ for(; wl; wl = wl->next) {
++ if (strncasecmp(wl->key, header, strlen(wl->key)) == 0){
++ log_this = 1;
++ break;
++ }
++ }
++ check_name = 0;
++ }
++ if (!log_this) {
++ if (c == '\n') {
++ /* check header name in next iteration */
++ check_name = 1;
++ }
++ continue;
++ }
++
+ #if !OLD_LOG_MIME
+ if (c == '\r') {
+ *buf_cursor++ = '\\';
+@@ -145,6 +175,7 @@ log_quote(const char *header)
+ } else if (c == '\n') {
+ *buf_cursor++ = '\\';
+ *buf_cursor++ = 'n';
++ check_name = 1;
+ } else
+ #endif
+ if (c <= 0x1F
diff --git a/www/squid/patches/patch-ak b/www/squid/patches/patch-ak
new file mode 100644
index 00000000000..13398ef7c45
--- /dev/null
+++ b/www/squid/patches/patch-ak
@@ -0,0 +1,26 @@
+$NetBSD: patch-ak,v 1.3 2000/11/02 10:31:39 jdolecek Exp $
+
+--- cf.data.pre.orig Thu Nov 2 09:56:18 2000
++++ cf.data.pre Thu Nov 2 10:48:58 2000
+@@ -773,6 +773,21 @@ DOC_START
+ log_mime_hdrs off
+ DOC_END
+
++NAME: log_mime_hdrs_list
++TYPE: wordlist
++LOC: Config.log_mime_hdrs_list
++DEFAULT: none
++DOC_START
++ The Cache can record both the request and the response MIME
++ headers for each HTTP transaction. The headers are encoded
++ safely and will appear as two bracketed fields at the end of
++ the access log (for either the native or httpd-emulated log
++ formats). This list specifies which headers should be passed.
++ Note header logging need to be enabled by 'log_mime_hdrs on'
++ first.
++
++log_mime_hdrs_list all
++DOC_END
+
+ NAME: useragent_log
+ TYPE: string
diff --git a/www/squid/patches/patch-al b/www/squid/patches/patch-al
new file mode 100644
index 00000000000..3500970f2e2
--- /dev/null
+++ b/www/squid/patches/patch-al
@@ -0,0 +1,12 @@
+$NetBSD: patch-al,v 1.1 2000/11/02 10:31:39 jdolecek Exp $
+
+--- structs.h.orig Thu Nov 2 09:51:20 2000
++++ structs.h Thu Nov 2 09:52:03 2000
+@@ -359,6 +359,7 @@ struct _SquidConfig {
+ wordlist *mcast_group_list;
+ wordlist *dns_testname_list;
+ wordlist *dns_nameservers;
++ wordlist *log_mime_hdrs_list;
+ peer *peers;
+ int npeers;
+ struct {