Package: privoxy Version: 3.0.3-3 Severity: normal Tags: patch When privoxy receives a page using Transfer-Encoding: chunked, and then de-chunks it for filtering, it changes the header to "identity". This value of the header was included in RFC 2616 by mistake; the working group meant to pull it out. See <http://purl.org/NET/http-errata#identity> and the http-wg mailing list archives for discussion of this.
Specifically, this breaks libneon and therefore gweather-applet, the GNOME weather panel applet, which attempts to receive US METAR weather data using chunked encoding. Privoxy's use of "Transfer-Encoding: identity" is reasonable based on the spec as published, and I believe libneon is also at fault for assuming that any T-E header implies the chunked encoding it asked for. But the attached patch brings privoxy into better standards compliance, and fixes a real-world interoperability problem. -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing'), (500, 'stable'), (50, 'unstable') Architecture: powerpc (ppc) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.11-powerpc Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages privoxy depends on: ii adduser 3.64 Add and remove users and groups ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libpcre3 5.0-1.1 Perl 5 Compatible Regular Expressi ii logrotate 3.7-5 Log rotation utility privoxy recommends no packages. -- no debconf information
--- privoxy-3.0.3/parsers.c 2003-07-11 13:21:25.000000000 +0000 +++ privoxy-new/parsers.c 2005-07-17 01:08:19.000000000 +0000 @@ -871,8 +871,7 @@ * * Description : - Prohibit filtering (CT_TABOO) if transfer coding compresses * - Raise the CSP_FLAG_CHUNKED flag if coding is "chunked" - * - Change from "chunked" to "identity" if body was chunked - * but has been de-chunked for filtering. + * - Remove if chunked body was de-chunked for filtering. * * Parameters : * 1 : csp = Current client state (buffers, headers, etc...) @@ -904,13 +903,13 @@ /* * If the body was modified, it has been - * de-chunked first, so adjust the header: + * de-chunked first, so remove the header. + * Don't use "identity" encoding, which was included in + * RFC 2616 by mistake (http://purl.org/NET/http-errata#identity). */ if (csp->flags & CSP_FLAG_MODIFIED) { freez(*header); - *header = strdup("Transfer-Encoding: identity"); - return (header == NULL) ? JB_ERR_MEMORY : JB_ERR_OK; } }