1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 09_no_identity.dpatch by Michael Shields <shields@msrl.com>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: After dechunking remove the "chunked"-header instead of replacing it
6 ## DP: by an "identity" header. (#318683).
9 diff -urNad privoxy~/parsers.c privoxy/parsers.c
10 --- privoxy~/parsers.c
14 * Description : - Prohibit filtering (CT_TABOO) if transfer coding compresses
15 * - Raise the CSP_FLAG_CHUNKED flag if coding is "chunked"
16 - * - Change from "chunked" to "identity" if body was chunked
17 - * but has been de-chunked for filtering.
18 + * - Remove if chunked body was de-chunked for filtering.
21 * 1 : csp = Current client state (buffers, headers, etc...)
22 @@ -1281,14 +1280,13 @@
25 * If the body was modified, it has been
26 - * de-chunked first, so adjust the header:
27 + * de-chunked first, so remove the header.
28 + * Don't use "identity" encoding, which was included in
29 + * RFC 2616 by mistake (http://purl.org/NET/http-errata#identity).
31 if (csp->flags & CSP_FLAG_MODIFIED)
34 - *header = strdup("Transfer-Encoding: identity");
35 - log_error(LOG_LEVEL_HEADER, "Set: %s", *header);
36 - return (header == NULL) ? JB_ERR_MEMORY : JB_ERR_OK;