X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=filters.c;h=ef9661ec65d2fffadd18af43dc64f2ddad89f31d;hp=cae3c846ff4a73d55cd63479212643d9f44898fb;hb=d84e4a85cb49e14312eab212103795d747c3bd23;hpb=7d6c6c53d7283529cc1f7942f898ab4f3768a2f6 diff --git a/filters.c b/filters.c index cae3c846..ef9661ec 100644 --- a/filters.c +++ b/filters.c @@ -1671,6 +1671,10 @@ static char *pcrs_filter_response(struct client_state *csp) */ if (!hits) { + if (old != csp->iob->cur && old != new) + { + freez(old); + } freez(new); return(NULL); } @@ -1959,7 +1963,8 @@ static char *gif_deanimate_response(struct client_state *csp) } else { - log_error(LOG_LEVEL_DEANIMATE, "Success! GIF shrunk from %d bytes to %d.", size, out->offset); + log_error(LOG_LEVEL_DEANIMATE, + "Success! GIF shrunk from %lu bytes to %lu.", size, out->offset); } csp->content_length = out->offset; csp->flags |= CSP_FLAG_MODIFIED; @@ -2065,8 +2070,8 @@ static jb_err remove_chunked_transfer_coding(char *buffer, size_t *size) { log_error(LOG_LEVEL_ERROR, "Chunk size %u exceeds buffered data left. " - "Already digested %u of %u buffered bytes.", - chunksize, (unsigned int)newsize, (unsigned int)*size); + "Already digested %lu of %lu buffered bytes.", + chunksize, newsize, *size); return JB_ERR_PARSE; } @@ -2120,7 +2125,8 @@ static jb_err remove_chunked_transfer_coding(char *buffer, size_t *size) } /* XXX: Should get its own loglevel. */ - log_error(LOG_LEVEL_RE_FILTER, "De-chunking successful. Shrunk from %d to %d", *size, newsize); + log_error(LOG_LEVEL_RE_FILTER, + "De-chunking successful. Shrunk from %lu to %lu", *size, newsize); *size = newsize; @@ -2669,7 +2675,7 @@ int content_requires_filtering(struct client_state *csp) * The server didn't bother to declare a MIME-Type. * Assume it's text that can be filtered. * - * This also regulary happens with 304 responses, + * This also regularly happens with 304 responses, * therefore logging anything here would cause * too much noise. */