projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update URLs for trackers and mailing lists
[privoxy.git]
/
filters.c
diff --git
a/filters.c
b/filters.c
index
973c5d1
..
ef9661e
100644
(file)
--- a/
filters.c
+++ b/
filters.c
@@
-1671,6
+1671,10
@@
static char *pcrs_filter_response(struct client_state *csp)
*/
if (!hits)
{
*/
if (!hits)
{
+ if (old != csp->iob->cur && old != new)
+ {
+ freez(old);
+ }
freez(new);
return(NULL);
}
freez(new);
return(NULL);
}
@@
-1823,7
+1827,7
@@
static char *execute_external_filter(const struct client_state *csp,
*/
if ((*size != 0) && fwrite(content, *size, 1, fp) != 1)
{
*/
if ((*size != 0) && fwrite(content, *size, 1, fp) != 1)
{
- log_error(LOG_LEVEL_ERROR, "fwrite(..., %
d
, 1, ..) failed: %E", *size);
+ log_error(LOG_LEVEL_ERROR, "fwrite(..., %
lu
, 1, ..) failed: %E", *size);
unlink(file_name);
fclose(fp);
return NULL;
unlink(file_name);
fclose(fp);
return NULL;
@@
-1899,7
+1903,7
@@
static char *execute_external_filter(const struct client_state *csp,
{
log_error(LOG_LEVEL_RE_FILTER,
"Executing '%s' resulted in return value %d. "
{
log_error(LOG_LEVEL_RE_FILTER,
"Executing '%s' resulted in return value %d. "
- "Read %
d of up to %d
bytes.", name, (ret >> 8), new_size, *size);
+ "Read %
lu of up to %lu
bytes.", name, (ret >> 8), new_size, *size);
}
unlink(file_name);
}
unlink(file_name);
@@
-1959,7
+1963,8
@@
static char *gif_deanimate_response(struct client_state *csp)
}
else
{
}
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;
}
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. "
{
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 %l
u buffered bytes.",
+ chunksize,
newsize,
*size);
return JB_ERR_PARSE;
}
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. */
}
/* 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;
*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.
*
* 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 regular
l
y happens with 304 responses,
* therefore logging anything here would cause
* too much noise.
*/
* therefore logging anything here would cause
* too much noise.
*/