Add changes from 3.0.6-2, 3.0.6-3 and several unreleased changes
authorRoland Rosenfeld <roland@spinnaker.de>
Thu, 7 Jun 2007 10:41:02 +0000 (10:41 +0000)
committerRoland Rosenfeld <roland@spinnaker.de>
Thu, 7 Jun 2007 10:41:02 +0000 (10:41 +0000)
according to CVS as of 2007-06-07.

17 files changed:
debian/changelog
debian/control
debian/patches/00list
debian/patches/05_defaut_action.dpatch
debian/patches/14_config.dpatch
debian/patches/15_mansection8.dpatch
debian/patches/16_gzip.dpatch [deleted file]
debian/patches/17_502_no_such_domain.dpatch
debian/patches/24_global_action.dpatch
debian/patches/25_standard_medium.dpatch
debian/patches/26_edit_only_writable.dpatch [deleted file]
debian/patches/27_remove_nsl.dpatch
debian/patches/29_usermanual.dpatch [new file with mode: 0755]
debian/patches/30_actionsfile_fullname.dpatch [new file with mode: 0755]
debian/postinst
debian/postrm
debian/rules

index dffb210..4a4c1ff 100644 (file)
@@ -1,3 +1,34 @@
+privoxy (3.0.7~CSV20070607-0.1) UNRELEASED; urgency=low
+
+  * CVS as of 2007-06-07. 
+  * Enable new zlib feature (Closes: #368448):
+    - build-depend on zlib1g-dev
+    - disable prevent-compression in 25_standard_medium.dpatch
+  * Remove 28_pcre_returncode.dpatch, which is now applied upstream.
+  * 29_usermanual: fix some broken markup in user-manual.sgml
+  * 30_actionsfile_fullname.dpatch: The "actionsfile" syntax in the
+    configuration file is consistent with the rest of the configuration
+    options and requires the whole file name.
+
+ -- Roland Rosenfeld <roland@debian.org>  Thu,  7 Jun 2007 12:30:02 +0200
+
+privoxy (3.0.6-3) unstable; urgency=low
+
+  * According to http://wiki.debian.org/AccountHandlingInMaintainerScripts
+    removing system users in postrm isn't a good idea. So the removal of
+    user privoxy in postrm was disabled and deluser/adduser of existing
+    user in postinst was also removed. This should avoid problems with
+    purging privoxy if passwd package isn't intalled (Closes: #417015).
+
+ -- Roland Rosenfeld <roland@debian.org>  Sat, 19 May 2007 21:22:42 +0200
+
+privoxy (3.0.6-2) unstable; urgency=medium
+
+  * 28_pcre_returncode: Don't crash if pcre returns an error code that
+    pcrs didn't expect (Closes: #404284).
+
+ -- Roland Rosenfeld <roland@debian.org>  Sat, 23 Dec 2006 21:47:12 +0100
+
 privoxy (3.0.6-1) unstable; urgency=low
 
   * New upstream release 3.0.6.
@@ -355,7 +386,7 @@ privoxy (2.9.16-1) unstable; urgency=low
 privoxy (2.9.14-beta-4) unstable; urgency=low
 
   * Damn, why did I write "i386-linux" into the rules file, when I try to
-    write a work around for hppa?  Fixed now (Closes #148227).
+    write a work around for hppa?  Fixed now (Closes: #148227).
 
  -- Roland Rosenfeld <roland@debian.org>  Sun, 26 May 2002 22:33:26 +0200
 
index f33f074..085e5bf 100644 (file)
@@ -2,7 +2,7 @@ Source: privoxy
 Section: web
 Priority: optional
 Maintainer: Roland Rosenfeld <roland@debian.org>
-Build-Depends: debhelper (>= 5.0.0), autoconf, autotools-dev, libpcre3-dev, jade, docbook-dsssl, w3m, sp, sgmlspl, groff, htmldoc (>= 1.8.25-1), man2html, dpatch
+Build-Depends: debhelper (>= 5.0.0), autoconf, autotools-dev, libpcre3-dev, jade, docbook-dsssl, w3m, sp, sgmlspl, groff, htmldoc (>= 1.8.25-1), man2html, dpatch, zlib1g-dev
 Standards-Version: 3.7.2
 
 Package: privoxy
index 4de4884..f70b06b 100644 (file)
@@ -6,12 +6,12 @@
 11_backup_autotools.dpatch
 14_config.dpatch
 15_mansection8.dpatch
-# 16_gzip.dpatch # still broken.
 17_502_no_such_domain.dpatch 
 19_manpage_fixup.dpatch
 20_makefile_fixup.dpatch
 23_fix_faq_id.dpatch
 24_global_action.dpatch
 25_standard_medium.dpatch
-26_edit_only_writable.dpatch
 27_remove_nsl.dpatch
+29_usermanual.dpatch
+30_actionsfile_fullname.dpatch
index 0c1ea5c..f1d9c97 100644 (file)
@@ -8,7 +8,7 @@
 diff -urNad privoxy~/default.action.master privoxy/default.action.master
 --- privoxy~/default.action.master
 +++ privoxy/default.action.master
-@@ -1695,6 +1695,11 @@
+@@ -1839,6 +1839,11 @@
  {+filter{tiny-textforms} +prevent-compression}
  .sourceforge.net/tracker
  
index ae8f063..76240b8 100644 (file)
@@ -12,7 +12,7 @@ diff -urNad privoxy~/config privoxy/config
 -#        Sample Configuration File for Privoxy v3.0.6
 +#        Sample Configuration File for Privoxy
  #
- #  $Id: config,v 1.56 2006/11/14 01:54:36 hal9 Exp $
+ #  $Id: config,v 1.57 2007/01/02 01:39:52 david__schmidt Exp $
  #
 @@ -123,7 +123,7 @@
  #          If set, this option should be the first option in the config
index 61cf002..944f316 100644 (file)
@@ -62,7 +62,7 @@ diff -urNad privoxy~/GNUmakefile.in privoxy/GNUmakefile.in
  
  
  # readme page and INSTALL file
-@@ -1123,8 +1123,8 @@
+@@ -1127,8 +1127,8 @@
                $(INSTALL) $(INSTALL_T) $(DOK_WEB)/p_doc.css $$DOC/user-manual;\
        fi
        @# Not all platforms support gzipped man pages.
@@ -73,7 +73,7 @@ diff -urNad privoxy~/GNUmakefile.in privoxy/GNUmakefile.in
  
        @# Change the config file default directories according to the configured ones
        @$(ECHO) Rewriting config for this installation
-@@ -1284,7 +1284,7 @@
+@@ -1288,7 +1288,7 @@
  
        @# man page and docs
        @$(ECHO) Removing $(PROGRAM) docs
diff --git a/debian/patches/16_gzip.dpatch b/debian/patches/16_gzip.dpatch
deleted file mode 100755 (executable)
index 9d6cc72..0000000
+++ /dev/null
@@ -1,527 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 16_gzip.dpatch by Wil Mahan <wmahan@users.sourceforge.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Add deflate-filter support to privoxy, see sf bug id 895531
-## DP: Adapted from privoxy 3.1 to 3.0.x by Roland Rosenfeld.
-## DP: This requires --enable-zlib as configure option in debian/rules
-## DP: and a build dependeny on zlib1g-dev.
-
-@DPATCH@
-diff -urNad privoxy~/actionlist.h privoxy/actionlist.h
---- privoxy~/actionlist.h
-+++ privoxy/actionlist.h
-@@ -116,6 +116,7 @@
- DEFINE_ACTION_STRING     ("deanimate-gifs",             ACTION_DEANIMATE,       ACTION_STRING_DEANIMATE)
- DEFINE_CGI_PARAM_RADIO   ("deanimate-gifs",             ACTION_DEANIMATE,       ACTION_STRING_DEANIMATE,     "first", 0)
- DEFINE_CGI_PARAM_RADIO   ("deanimate-gifs",             ACTION_DEANIMATE,       ACTION_STRING_DEANIMATE,     "last",  1)
-+DEFINE_ACTION_BOOL       ("decompress-from-server",     ACTION_DECOMPRESS_IN)
- DEFINE_ACTION_BOOL       ("downgrade-http-version",     ACTION_DOWNGRADE)
- DEFINE_ACTION_BOOL       ("fast-redirects",             ACTION_FAST_REDIRECTS)
- DEFINE_ACTION_MULTI      ("filter",                     ACTION_MULTI_FILTER)
-diff -urNad privoxy~/configure.in privoxy/configure.in
---- privoxy~/configure.in
-+++ privoxy/configure.in
-@@ -1234,6 +1234,20 @@
-                                 libpcrs is available],
- [ if test $enableval = "no"; then have_pcrs=no; fi ])
-+AC_ARG_ENABLE(zlib,
-+[  --enable-zlib            Use the zlib library to allow compressing or
-+                             decompressing data on the fly.],
-+[enableval2=$enableval],
-+[enableval2=no])
-+if test $enableval2 = yes; then
-+  AC_CHECK_LIB(z, zlibVersion, , [
-+    AC_MSG_ERROR([Unable to find a copy of zlib.  The zlib library
-+is necessary to enable compresion support. ])
-+  ]) 
-+  AC_DEFINE(FEATURE_ZLIB,1,
-+    [ Define to 1 to use compression through the zlib library. ])
-+fi
-+
- # If we have libpcre and either we also have pcreposix or
- # we don't need pcreposix, then link pcre dynamically; else
-diff -urNad privoxy~/default.action.master privoxy/default.action.master
---- privoxy~/default.action.master
-+++ privoxy/default.action.master
-@@ -452,7 +452,7 @@
- -hide-user-agent \
- -kill-popups \
- -limit-connect \
--+prevent-compression \
-+-prevent-compression \
- -send-vanilla-wafer \
- -send-wafer \
- +session-cookies-only \
-diff -urNad privoxy~/filters.c privoxy/filters.c
---- privoxy~/filters.c
-+++ privoxy/filters.c
-@@ -1325,6 +1325,38 @@
-          return(NULL);
-    }
-+#ifdef FEATURE_ZLIB
-+   /* If the body has a compressed transfer-encoding, uncompress
-+    * it first, adjusting size and iob->eod.  Note that
-+    * decompression occurs after de-chunking.
-+    */
-+   if (csp->content_type & CT_GZIP || csp->content_type & CT_DEFLATE)
-+   {
-+      /* Notice that we at least tried to decompress. */
-+      if (JB_ERR_OK != decompress_iob(csp))
-+      {
-+       /* We failed to decompress the data; there's no point
-+        * in continuing since we can't filter.  This is
-+        * slightly tricky because we need to remember not to
-+        * modify the Content-Encoding header later; using
-+        * CT_TABOO flag is a kludge for this purpose.
-+        */
-+         csp->content_type |= CT_TABOO;
-+         return(NULL);
-+      }
-+      log_error(LOG_LEVEL_RE_FILTER, "Decompressing successful");
-+
-+      /* Decompression gives us a completely new iob, so we
-+       * need to update.
-+       */
-+      size = csp->iob->eod - csp->iob->cur;
-+      old  = csp->iob->cur;
-+
-+      csp->flags |= CSP_FLAG_MODIFIED;
-+   }
-+#endif
-+
-+
-    /*
-     * If the body has a "chunked" transfer-encoding,
-     * get rid of it first, adjusting size and iob->eod
-diff -urNad privoxy~/jcc.c privoxy/jcc.c
---- privoxy~/jcc.c
-+++ privoxy/jcc.c
-@@ -659,6 +659,10 @@
- #  include <select.h>
- # endif
-+#ifdef FEATURE_ZLIB
-+#include <zlib.h>
-+#endif
-+
- #endif
- #include "project.h"
-@@ -1609,6 +1613,8 @@
-             if ((csp->content_type & CT_TEXT) &&  /* It's a text / * MIME-Type */
-                 !http->ssl    &&                  /* We talk plaintext */
-+                                       !(csp->content_type & CT_GZIP)    && 
-+                                       !(csp->content_type & CT_DEFLATE) && 
-                 block_popups)                     /* Policy allows */
-             {
-                block_popups_now = 1;
-diff -urNad privoxy~/parsers.c privoxy/parsers.c
---- privoxy~/parsers.c
-+++ privoxy/parsers.c
-@@ -433,6 +433,10 @@
- #include <assert.h>
- #include <string.h>
-+#ifdef FEATURE_ZLIB
-+#include <zlib.h>
-+#endif
-+
- #if !defined(_WIN32) && !defined(__OS2__)
- #include <unistd.h>
- #endif
-@@ -632,6 +636,281 @@
- }
-+#ifdef FEATURE_ZLIB
-+/*********************************************************************
-+ *
-+ * Function    :  decompress_iob
-+ *
-+ * Description :  Decompress buffered page, expanding the
-+ *                buffer as necessary.  csp->iob->cur
-+ *                should point to the the beginning of the
-+ *                compressed data block.
-+ *
-+ * Parameters  :
-+ *          1  :  csp = Current client state (buffers, headers, etc...)
-+ *
-+ * Returns     :  JB_ERR_OK on success, JB_ERR_MEMORY if out-of-memory
-+ *                limit reached, JB_ERR_COMPRESS if error decompressing
-+ *                buffer.
-+ *
-+ *********************************************************************/
-+jb_err decompress_iob(struct client_state *csp)
-+{
-+   char *buf;                    /* new, uncompressed buffer */
-+   int bufsize = csp->iob->size; /* allocated size of the new buffer */
-+                                 /* Number of bytes at the beginning
-+                                * of the iob that we should NOT
-+                                * decompress.
-+                                */
-+   int skip_size = csp->iob->cur - csp->iob->buf;
-+   int status;                   /* return status of the inflate() call */
-+   z_stream zstr;           /* used by calls to zlib */
-+
-+   /* This is to protect the parsing of gzipped data, but it should(?)
-+    * be valid for deflated data also.
-+    */
-+   if (bufsize < 10)
-+   {
-+      log_error (LOG_LEVEL_ERROR, "Buffer too small decompressing iob");
-+      return JB_ERR_COMPRESS;
-+   }
-+
-+   if (csp->content_type & CT_GZIP)
-+   {
-+      /* Our task is slightly complicated by the facts that data
-+       * compressed by gzip does not include a zlib header, and
-+       * that there is no easily accessible interface in zlib to
-+       * handle a gzip header.  We strip off the gzip header by
-+       * hand, and later inform zlib not to expect a header.
-+       */
-+
-+      /* Strip off the gzip header.  Please see RFC 1952 for more
-+       * explanation of the appropriate fields.
-+       */
-+      if ((*csp->iob->cur++ != (char)0x1f)
-+           || (*csp->iob->cur++ != (char)0x8b)
-+         || (*csp->iob->cur++ != Z_DEFLATED))
-+      {
-+         log_error (LOG_LEVEL_ERROR,
-+                   "Invalid gzip header when decompressing");
-+         return JB_ERR_COMPRESS;
-+      }
-+      else {
-+         int flags = *csp->iob->cur++;
-+         if (flags & 0xe0)
-+         {
-+            /* The gzip header has reserved bits set; bail out. */
-+            log_error (LOG_LEVEL_ERROR,
-+                      "Invalid gzip header when decompressing");
-+            return JB_ERR_COMPRESS;
-+         }
-+         csp->iob->cur += 6;
-+
-+         /* Skip extra fields if necessary. */
-+         if (flags & 0x04)
-+         {
-+            /* Skip a given number of bytes, specified as a 16-bit
-+           * little-endian value.
-+           */
-+            csp->iob->cur += *csp->iob->cur++ + (*csp->iob->cur++ << 8);
-+         }
-+
-+         /* Skip the filename if necessary. */
-+         if (flags & 0x08)
-+         {
-+            /* A null-terminated string follows. */
-+            while (*csp->iob->cur++);
-+         }
-+
-+         /* Skip the comment if necessary. */
-+         if (flags & 0x10)
-+         {
-+            while (*csp->iob->cur++);
-+         }
-+
-+         /* Skip the CRC if necessary. */
-+         if (flags & 0x02)
-+         {
-+            csp->iob->cur += 2;
-+         }
-+      }
-+   }
-+   else if (csp->content_type & CT_DEFLATE)
-+   {
-+   log_error (LOG_LEVEL_INFO, "Decompressing deflated iob: %d", *csp->iob->cur);
-+      /* In theory (that is, according to RFC 1950), deflate-compressed
-+       * data should begin with a two-byte zlib header and have an
-+       * adler32 checksum at the end.  It seems that in practice the
-+       * only the raw compressed data is sent.  Note that this means that
-+       * we are not RFC 1950-compliant here, but the advantage is that
-+       * this actually works. :)
-+       *
-+       * We add a dummy null byte to tell zlib where the data ends,
-+       * and later inform it not to expect a header.
-+       *
-+       * Fortunately, add_to_iob() has thoughtfully null-terminated
-+       * the buffer; we can just increment the end pointer to include
-+       * the dummy byte.  
-+       */
-+      csp->iob->eod++;
-+   }
-+   else
-+   {
-+      log_error (LOG_LEVEL_ERROR,
-+                                        "Unable to determine compression format for decompression");
-+      return JB_ERR_COMPRESS;
-+   }
-+
-+   /* Set up the fields required by zlib. */
-+   zstr.next_in  = csp->iob->cur;
-+   zstr.avail_in = csp->iob->eod - csp->iob->cur;
-+   zstr.zalloc   = Z_NULL;
-+   zstr.zfree    = Z_NULL;
-+   zstr.opaque   = Z_NULL;
-+
-+   /* Passing -MAX_WBITS to inflateInit2 tells the library
-+    * that there is no zlib header.
-+    */
-+   if (inflateInit2 (&zstr, -MAX_WBITS) != Z_OK)
-+   {
-+      log_error (LOG_LEVEL_ERROR,
-+                "Error initializing decompression");
-+      return JB_ERR_COMPRESS;
-+   }
-+
-+   /* Next, we allocate new storage for the inflated data.
-+    * We don't modify the existing iob yet, so in case there
-+    * is error in decompression we can recover gracefully.
-+    */
-+   buf = zalloc (bufsize);
-+   if (NULL == buf)
-+   {
-+      log_error (LOG_LEVEL_ERROR,
-+                "Out of memory decompressing iob");
-+      return JB_ERR_MEMORY;
-+   }
-+
-+   assert(bufsize >= skip_size);
-+   memcpy(buf, csp->iob->buf, skip_size);
-+   zstr.avail_out = bufsize - skip_size;
-+   zstr.next_out  = buf + skip_size;
-+
-+   /* Try to decompress the whole stream in one shot. */
-+   while (Z_BUF_ERROR == (status = inflate(&zstr, Z_FINISH)))
-+   { 
-+      /* We need to allocate more memory for the output buffer. */
-+
-+      char *tmpbuf;             /* used for realloc'ing the buffer */
-+      int oldbufsize = bufsize; /* keep track of the old bufsize */
-+
-+      /* If zlib wants more data then there's a problem, because
-+       * the complete compressed file should have been buffered.
-+       */
-+      if (0 == zstr.avail_in)
-+      {
-+         log_error(LOG_LEVEL_ERROR,
-+                  "Unexpected end of compressed iob");
-+         return JB_ERR_COMPRESS;
-+      }
-+
-+      /* If we tried the limit and still didn't have enough
-+       * memory, just give up.
-+       */
-+      if (bufsize == csp->config->buffer_limit)
-+      {
-+         log_error(LOG_LEVEL_ERROR, "Out of memory decompressing iob");
-+         return JB_ERR_MEMORY;
-+      }
-+
-+      /* Try doubling the buffer size each time. */
-+      bufsize *= 2;
-+
-+      /* Don't exceed the buffer limit. */
-+      if (bufsize > csp->config->buffer_limit)
-+      {
-+         bufsize = csp->config->buffer_limit;
-+      }
-+    
-+      /* Try to allocate the new buffer. */
-+      tmpbuf = realloc(buf, bufsize);
-+      if (NULL == tmpbuf)
-+      {
-+         log_error(LOG_LEVEL_ERROR, "Out of memory decompressing iob");
-+       freez(buf);
-+         return JB_ERR_MEMORY;
-+      }
-+      else
-+      {
-+         char *oldnext_out = zstr.next_out;
-+
-+         /* Update the fields for inflate() to use the new
-+        * buffer, which may be in a different location from
-+        * the old one.
-+        */
-+         zstr.avail_out += bufsize - oldbufsize;
-+       zstr.next_out = tmpbuf + bufsize - zstr.avail_out;
-+
-+         /* Compare with an uglier method of calculating these values
-+        * that doesn't require the extra oldbufsize variable.
-+        */
-+         assert(zstr.avail_out ==
-+                tmpbuf + bufsize - (char *)zstr.next_out);
-+         assert((char *)zstr.next_out ==
-+                tmpbuf + ((char *)oldnext_out - buf));
-+         assert(zstr.avail_out > 0);
-+
-+         buf = tmpbuf;
-+      }
-+   }
-+
-+   inflateEnd(&zstr);
-+   if (status != Z_STREAM_END)
-+   {
-+      /* We failed to decompress the stream. */
-+      log_error(LOG_LEVEL_ERROR,
-+               "Error in decompressing to the buffer (iob): %s",
-+             zstr.msg);
-+      return JB_ERR_COMPRESS;
-+   }
-+
-+   /* Finally, we can actually update the iob, since the
-+    * decompression was successful.  First, free the old
-+    * buffer.
-+    */
-+   freez(csp->iob->buf);
-+
-+   /* Now, update the iob to use the new buffer. */
-+   csp->iob->buf  = buf;
-+   csp->iob->cur  = csp->iob->buf + skip_size;
-+   csp->iob->eod  = zstr.next_out;
-+   csp->iob->size = bufsize;
-+  
-+   /* Make sure the new uncompressed iob obeys some minimal
-+    * consistency conditions.
-+    */
-+   if ((csp->iob->buf < csp->iob->cur)
-+       && (csp->iob->cur <= csp->iob->eod)
-+       && (csp->iob->eod <= csp->iob->buf + csp->iob->size))
-+   {
-+         char t = csp->iob->cur[100];
-+         csp->iob->cur[100] = 0;
-+      log_error(LOG_LEVEL_INFO,
-+               "Sucessfully decompressed: %s", csp->iob->cur);
-+         csp->iob->cur[100] = t;
-+      return JB_ERR_OK;
-+   }
-+   else
-+   {
-+      /* It seems that zlib did something weird. */
-+      log_error(LOG_LEVEL_ERROR,
-+               "Unexpected error decompressing the buffer (iob): %d==%d, %d>%d, %d<%d", csp->iob->cur,  csp->iob->buf + skip_size, csp->iob->eod, csp->iob->buf, csp->iob->eod, csp->iob->buf + csp->iob->size);
-+      return JB_ERR_COMPRESS;
-+   }
-+
-+}
-+#endif /* defined(FEATURE_ZLIB) */
-+
-+
- /*********************************************************************
-  *
-  * Function    :  get_header
-@@ -936,13 +1215,59 @@
-  *********************************************************************/
- jb_err server_content_encoding(struct client_state *csp, char **header)
- {
-+#ifdef FEATURE_ZLIB
-+   if (strstr(*header, "gzip"))
-+   {
-+      /*
-+       * If the body was modified, we have tried to
-+       * decompress it, so adjust the header if necessary.
-+       */
-+      if ((csp->flags & CSP_FLAG_MODIFIED) /* we attempted to decompress   */
-+      && !(csp->content_type & CT_TABOO))  /* decompression was successful */
-+      {
-+         freez(*header);
-+         *header = strdup("Content-Encoding: identity");
-+         return (header == NULL) ? JB_ERR_MEMORY : JB_ERR_OK;
-+      }
-+      else
-+      {
-+        csp->content_type |= CT_GZIP;
-+      }
-+   }
-+   else if (strstr(*header, "deflate"))
-+   {
-+      /*
-+       * If the body was modified, we have tried to
-+       * decompress it, so adjust the header if necessary.
-+       */
-+      if ((csp->flags & CSP_FLAG_MODIFIED) /* we attempted to decompress   */
-+      && !(csp->content_type & CT_TABOO))  /* decompression was successful */
-+      {
-+         freez(*header);
-+         *header = strdup("Content-Encoding: identity");
-+         return (header == NULL) ? JB_ERR_MEMORY : JB_ERR_OK;
-+      }
-+      else
-+      {
-+        csp->content_type |= CT_DEFLATE;
-+      }
-+   }
-+   else if (strstr(*header, "compress"))
-+   {
-+      /* We can't decompress this; therefore we can't filter
-+       * it either.
-+       */
-+      csp->content_type |= CT_TABOO;
-+   }
-+#else /* !defined(FEATURE_GZIP) */
-    /*
-     * Turn off pcrs and gif filtering if body compressed
-     */
-    if (strstr(*header, "gzip") || strstr(*header, "compress") || strstr(*header, "deflate"))
-    {
--      csp->content_type = CT_TABOO;
-+      csp->content_type |= CT_TABOO;
-    }
-+#endif /* !defined(FEATURE_GZIP) */
-    return JB_ERR_OK;
-diff -urNad privoxy~/parsers.h privoxy/parsers.h
---- privoxy~/parsers.h
-+++ privoxy/parsers.h
-@@ -194,6 +194,7 @@
- extern int flush_socket(jb_socket fd, struct client_state *csp);
- extern jb_err add_to_iob(struct client_state *csp, char *buf, int n);
-+extern jb_err decompress_iob(struct client_state *csp);
- extern char *get_header(struct client_state *csp);
- extern char *get_header_value(const struct list *header_list, const char *header_name);
- extern char *sed(const struct parsers pats[], const add_header_func_ptr more_headers[], struct client_state *csp);
-diff -urNad privoxy~/project.h privoxy/project.h
---- privoxy~/project.h
-+++ privoxy/project.h
-@@ -563,7 +563,7 @@
- #define JB_ERR_PARSE      4 /**< Error parsing file                       */
- #define JB_ERR_MODIFIED   5 /**< File has been modified outside of the  
-                                  CGI actions editor.                      */
--
-+#define JB_ERR_COMPRESS   6 /**< Error on decompression                   */
- /**
-  * This macro is used to free a pointer that may be NULL.
-@@ -818,6 +818,15 @@
- #define CT_TABOO  4 /**< csp->content_type bitmask:
-                          DO NOT filter, irrespective of other flags. */
-+/* Although these are not, strictly speaking, content types
-+ * (they are content encodings), it is simple to handle
-+ * them as such.
-+ */
-+#define CT_GZIP     8 /**< csp->content_type bitmask:
-+                         gzip-compressed data. */
-+#define CT_DEFLATE 16 /**< csp->content_type bitmask:
-+                         zlib-compressed data. */
-+
- /**
-  * The mask which includes all actions.
-  */
-@@ -862,6 +871,8 @@
- #define ACTION_VANILLA_WAFER   0x00008000UL
- /** Action bitmap: Limit CONNECT requests to safe ports. */
- #define ACTION_LIMIT_CONNECT   0x00010000UL
-+/** Action bitmap: Uncompress incoming text for filtering. */
-+#define ACTION_DECOMPRESS_IN   0x00020000UL
- /** Action string index: How to deanimate GIFs */
- #define ACTION_STRING_DEANIMATE     0
index 6eafee7..c77ba51 100755 (executable)
@@ -19,8 +19,8 @@ diff -urNad privoxy~/templates/no-such-domain privoxy/templates/no-such-domain
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-@@ -92,7 +92,7 @@
-   <table cellpadding="20" cellspacing="10" border="0" width="100%">
+@@ -95,7 +95,7 @@
+   <table summary="" cellpadding="20" cellspacing="10" border="0" width="100%">
      <tr>
        <td class="status">
 -        404
index e50abab..bbf87ad 100755 (executable)
@@ -32,16 +32,16 @@ diff -urNad privoxy~/config privoxy/config
 diff -urNad privoxy~/default.action.master privoxy/default.action.master
 --- privoxy~/default.action.master
 +++ privoxy/default.action.master
-@@ -530,75 +530,6 @@
- #
+@@ -537,74 +537,6 @@
  allow-ads   = -block -filter{banners-by-size} -filter{banners-by-link}
  
--#############################################################################
+ #############################################################################
 -# Defaults
 -#############################################################################
 -{ \
 --add-header \
 --block \
+--client-header-filter{hide-tor-exit-notation} \
 --content-type-overwrite \
 --crunch-client-header \
 --crunch-if-none-match \
@@ -76,12 +76,7 @@ diff -urNad privoxy~/default.action.master privoxy/default.action.master
 --filter{yahoo} \
 --filter{msn} \
 --filter{blogspot} \
---filter{xml-to-html} \
---filter{html-to-xml} \
 --filter{no-ping} \
---filter{hide-tor-exit-notation} \
---filter-client-headers \
---filter-server-headers \
 --force-text-mode \
 --handle-as-empty-document \
 --handle-as-image \
@@ -100,24 +95,29 @@ diff -urNad privoxy~/default.action.master privoxy/default.action.master
 --redirect \
 --send-vanilla-wafer \
 --send-wafer \
+--server-header-filter{xml-to-html} \
+--server-header-filter{html-to-xml} \
 --session-cookies-only \
 -+set-image-blocker{pattern} \
 --treat-forbidden-connects-like-blocks \
 -}
 -/ # Match all URLs
- #############################################################################
+-
+-#############################################################################
  # These extensions belong to images:
+ #############################################################################
+ {+handle-as-image -filter}
 diff -urNad privoxy~/global.action privoxy/global.action
 --- privoxy~/global.action
 +++ privoxy/global.action
-@@ -0,0 +1,69 @@
+@@ -0,0 +1,67 @@
 +#############################################################################
 +# Defaults
 +#############################################################################
 +{ \
 +-add-header \
 +-block \
++-client-header-filter{hide-tor-exit-notation} \
 +-content-type-overwrite \
 +-crunch-client-header \
 +-crunch-if-none-match \
@@ -152,12 +152,7 @@ diff -urNad privoxy~/global.action privoxy/global.action
 +-filter{yahoo} \
 +-filter{msn} \
 +-filter{blogspot} \
-+-filter{xml-to-html} \
-+-filter{html-to-xml} \
 +-filter{no-ping} \
-+-filter{hide-tor-exit-notation} \
-+-filter-client-headers \
-+-filter-server-headers \
 +-force-text-mode \
 +-handle-as-empty-document \
 +-handle-as-image \
@@ -176,6 +171,8 @@ diff -urNad privoxy~/global.action privoxy/global.action
 +-redirect \
 +-send-vanilla-wafer \
 +-send-wafer \
++-server-header-filter{xml-to-html} \
++-server-header-filter{html-to-xml} \
 +-session-cookies-only \
 ++set-image-blocker{pattern} \
 +-treat-forbidden-connects-like-blocks \
index 83db748..84466a5 100755 (executable)
@@ -10,7 +10,7 @@
 diff -urNad privoxy~/global.action privoxy/global.action
 --- privoxy~/global.action
 +++ privoxy/global.action
-@@ -10,29 +10,29 @@
+@@ -11,29 +11,29 @@
  -crunch-outgoing-cookies \
  -crunch-incoming-cookies \
  -crunch-server-header \
@@ -47,22 +47,24 @@ diff -urNad privoxy~/global.action privoxy/global.action
  -filter{site-specifics} \
  -filter{google} \
  -filter{yahoo} \
-@@ -52,17 +52,17 @@
+@@ -48,19 +48,19 @@
  -hide-if-modified-since \
  +hide-forwarded-for-headers \
  +hide-from-header{block} \
 --hide-referrer \
-++hide-referrer{forge} \
+++hide-referrer{conditional-block} \
  -hide-user-agent \
  -inspect-jpegs \
  -kill-popups \
  -limit-connect \
 --prevent-compression \
-++prevent-compression \
  -overwrite-last-modified \
++-prevent-compression \
  -redirect \
  -send-vanilla-wafer \
  -send-wafer \
+ -server-header-filter{xml-to-html} \
+ -server-header-filter{html-to-xml} \
 --session-cookies-only \
 ++session-cookies-only \
  +set-image-blocker{pattern} \
diff --git a/debian/patches/26_edit_only_writable.dpatch b/debian/patches/26_edit_only_writable.dpatch
deleted file mode 100755 (executable)
index de75113..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 26_edit_only_writable.dpatch by Fabian Keil <fabiankeil@users.sf.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Hide the edit button on http://p.p/show-status if action file can 
-## DP: not be written by the privoxy user.
-## DP: Extended version action.patch by Fabian Keil which shows a
-## DP: message, that the file is write protected.
-## DP: http://sf.net/tracker/?func=detail&atid=311118&aid=1564026&group_id=11118
-
-@DPATCH@
-diff -urNad privoxy~/cgisimple.c privoxy/cgisimple.c
---- privoxy~/cgisimple.c
-+++ privoxy/cgisimple.c
-@@ -248,6 +248,10 @@
- #include <string.h>
- #include <assert.h>
-+#ifdef HAVE_ACCESS
-+#include <unistd.h>
-+#endif /* def HAVE_ACCESS */
-+
- #ifdef _WIN32
- #define snprintf _snprintf
- #endif /* def _WIN32 */
-@@ -1040,8 +1044,20 @@
- #ifdef FEATURE_CGI_EDIT_ACTIONS
-          if (NULL == strstr(csp->actions_list[i]->filename, "standard.action") && NULL != csp->config->actions_file_short[i])
-          {
--            snprintf(buf, 100, "&nbsp;&nbsp;<a href=\"/edit-actions-list?f=%s\">Edit</a>", csp->config->actions_file_short[i]);
--            if (!err) err = string_append(&s, buf);
-+#ifdef HAVE_ACCESS
-+            if (access(csp->config->actions_file[i], W_OK) == 0)
-+            {
-+#endif /* def HAVE_ACCESS */
-+               snprintf(buf, 100, "&nbsp;&nbsp;<a href=\"/edit-actions-list?f=%s\">Edit</a>",
-+                  csp->config->actions_file_short[i]);
-+               if (!err) err = string_append(&s, buf);
-+#ifdef HAVE_ACCESS
-+            }
-+            else
-+            {
-+               if (!err) err = string_append(&s, "&nbsp;&nbsp;<strong>File is write protected.</strong>");
-+            }
-+#endif /* def HAVE_ACCESS */
-          }
- #endif
-diff -urNad privoxy~/configure.in privoxy/configure.in
---- privoxy~/configure.in
-+++ privoxy/configure.in
-@@ -1129,7 +1129,7 @@
- AC_TYPE_SIGNAL
- dnl uncommenting does not work for swa. suse linux
- dnl AC_FUNC_STAT
--AC_CHECK_FUNCS([atexit getcwd gethostbyaddr gethostbyaddr_r gethostbyname gethostbyname_r inet_ntoa localtime_r memchr memmove memset random regcomp select setlocale socket strchr strdup strerror strftime strptime strstr strtoul timegm])
-+AC_CHECK_FUNCS([access atexit getcwd gethostbyaddr gethostbyaddr_r gethostbyname gethostbyname_r inet_ntoa localtime_r memchr memmove memset random regcomp select setlocale socket strchr strdup strerror strftime strptime strstr strtoul timegm])
- dnl =================================================================
index 4f20cf6..988d988 100755 (executable)
@@ -8,7 +8,7 @@
 diff -urNad privoxy~/configure.in privoxy/configure.in
 --- privoxy~/configure.in
 +++ privoxy/configure.in
-@@ -886,7 +886,7 @@
+@@ -923,7 +923,7 @@
  dnl =================================================================
  
  dnl Next line needed to find the gethost*_r functions on Solaris
diff --git a/debian/patches/29_usermanual.dpatch b/debian/patches/29_usermanual.dpatch
new file mode 100755 (executable)
index 0000000..e5ff665
--- /dev/null
@@ -0,0 +1,55 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 29_usermanual.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix some broken markup in user-manual.sgml
+
+@DPATCH@
+diff -urNad privoxy~/doc/source/user-manual.sgml privoxy/doc/source/user-manual.sgml
+--- privoxy~/doc/source/user-manual.sgml
++++ privoxy/doc/source/user-manual.sgml
+@@ -452,7 +452,7 @@
+   <listitem>
+    <para>
+     Header filtering can be done with dedicated header filters now. As a result
+-    the actions <q>filter-client-headers</q> and <q>filter-server-headers</q>
++    the actions <quote>filter-client-headers</quote> and <quote>filter-server-headers</quote>
+     that were introduced with <application>Privoxy 3.0.5</application> to apply
+     the content filters to the headers as, well have been removed again.
+    </para>
+@@ -2442,8 +2442,6 @@
+ </sect3>
+-</sect2>
+-
+ <!--  ~  End section  ~  -->
+@@ -4079,7 +4077,7 @@
+     <listitem>
+      <para>
+       <quote>forward-socks4a 127.0.0.1:9050 .</quote> to use the socks4a proxy listening at 127.0.0.1 port 9050.
+-      Replace <q>forward-socks4a</q> with <q>forward-socks4</q> to use a socks4 connection  (with local DNS
++      Replace <quote>forward-socks4a</quote> with <quote>forward-socks4</quote> to use a socks4 connection  (with local DNS
+       resolution) instead.
+      </para>
+     </listitem>
+@@ -4087,7 +4085,7 @@
+      <para>
+       <quote>forward-socks4a 127.0.0.1:9050 proxy.example.org:8000</quote> to use the socks4a proxy
+       listening at 127.0.0.1 port 9050 to reach the HTTP proxy listening at proxy.example.org port 8000.
+-      Replace <q>forward-socks4a</q> with <q>forward-socks4</q> to use a socks4 connection  (with local DNS
++      Replace <quote>forward-socks4a</quote> with <quote>forward-socks4</quote> to use a socks4 connection  (with local DNS
+       resolution) instead.
+      </para>
+     </listitem>
+@@ -4116,7 +4114,7 @@
+      to exit.
+     </para>
+     <para>
+-     Use the <link linkend="http://config.privoxy.org/show-url-info">show-url-info CGI page</link>
++     Use the <ulink url="http://config.privoxy.org/show-url-info">show-url-info CGI page</ulink>
+      to verify that your forward settings do what you thought the do.
+     </para>
+    </warning>
diff --git a/debian/patches/30_actionsfile_fullname.dpatch b/debian/patches/30_actionsfile_fullname.dpatch
new file mode 100755 (executable)
index 0000000..3a55d00
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30_actionsfile_fullname.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: The "actionsfile" syntax in the configuration file is consistent
+## DP: with the rest of the configuration options and requires the
+## DP: whole file name.
+
+@DPATCH@
+diff -urNad privoxy~/config privoxy/config
+--- privoxy~/config
++++ privoxy/config
+@@ -334,10 +334,10 @@
+ #      privacy considerations, etc. There is no point in using Privoxy
+ #      without at least one actions file.
+ #
+-actionsfile standard  # Internal purpose, recommended
+-actionsfile global    # Global default setting for all sites
+-actionsfile default   # Main actions file
+-actionsfile user      # User customizations
++actionsfile standard.action  # Internal purpose, recommended
++actionsfile global.action    # Global default setting for all sites
++actionsfile default.action   # Main actions file
++actionsfile user.action      # User customizations
+ #
+ #  2.4. filterfile
index ccf2a17..4f9a0e0 100644 (file)
@@ -25,15 +25,8 @@ set -e
 
 case "$1" in
     configure)
-        if ! adduser --quiet --system --home /etc/privoxy --no-create-home \
-                    --ingroup nogroup --disabled-password privoxy
-        then
-           # user privoxy seems to exist
-           # -> remove him before newly adding him.
-           deluser --quiet privoxy
-           adduser --quiet --system --home /etc/privoxy --no-create-home \
-                   --ingroup nogroup --disabled-password privoxy
-       fi
+        adduser --quiet --system --home /etc/privoxy --no-create-home \
+           --ingroup nogroup --disabled-password privoxy
         chown -R privoxy.adm /var/log/privoxy
         chmod 750 /var/log/privoxy
        chown privoxy /etc/privoxy/user.action /etc/privoxy/trust
index b79c8ec..3b761d0 100644 (file)
@@ -20,7 +20,7 @@ set -e
 
 case "$1" in
     purge)
-        deluser --quiet privoxy
+        deluser --quiet privoxy
         rm -rf /var/log/privoxy /etc/privoxy
         ;;
 
index 8f6c4a5..6e7ada5 100755 (executable)
@@ -33,6 +33,7 @@ build-stamp: patch-stamp
        env CFLAGS="$(OPTIMIZE) -g" \
                ./configure --prefix=/usr --sysconfdir=/etc \
                --mandir=/usr/share/man $(WITHDEBUG) \
+               --enable-zlib \
                --with-docbook=/usr/share/sgml/docbook/stylesheet/dsssl/modular
        $(MAKE)
 #       create missing doc/pdf directory if necessary: