X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=loaders.c;h=5f21fd0b0a71a0e41bf90801ef2b8ad0d810bcc4;hp=3bfcdd2733a27146fdfc0fd6e0098f16ac363d6f;hb=59d3fb7457a63f1c1aca6fc6e5517b7d88c224b2;hpb=ab082f57780b5acb5b1305d82309a1dea8c026a1 diff --git a/loaders.c b/loaders.c index 3bfcdd27..5f21fd0b 100644 --- a/loaders.c +++ b/loaders.c @@ -46,7 +46,7 @@ #include #include -#if !defined(_WIN32) && !defined(__OS2__) +#if !defined(_WIN32) #include #endif @@ -222,13 +222,13 @@ unsigned int sweep(void) { last_active->next = client_list->next; -#ifdef FEATURE_STATISTICS +#if defined(FEATURE_STATISTICS) && !defined(MUTEX_LOCKS_AVAILABLE) urls_read++; if (csp->flags & CSP_FLAG_REJECTED) { urls_rejected++; } -#endif /* def FEATURE_STATISTICS */ +#endif /* defined(FEATURE_STATISTICS) && !defined(MUTEX_LOCKS_AVAILABLE) */ freez(client_list); @@ -1164,6 +1164,10 @@ int load_one_re_filterfile(struct client_state *csp, int fileid) new_filter = FT_EXTERNAL_CONTENT_FILTER; } #endif + else if (strncmp(buf, "CLIENT-BODY-FILTER:", 19) == 0) + { + new_filter = FT_CLIENT_BODY_FILTER; + } /* * If this is the head of a new filter block, make it a @@ -1182,6 +1186,10 @@ int load_one_re_filterfile(struct client_state *csp, int fileid) new_bl->name = chomp(buf + 16); } #endif + else if (new_filter == FT_CLIENT_BODY_FILTER) + { + new_bl->name = chomp(buf + 19); + } else { new_bl->name = chomp(buf + 21); @@ -1325,7 +1333,8 @@ int load_one_re_filterfile(struct client_state *csp, int fileid) } else { - log_error(LOG_LEVEL_ERROR, "Ignoring job %s outside filter block in %s, line %d", + log_error(LOG_LEVEL_ERROR, + "Ignoring job %s outside filter block in %s, line %lu", buf, csp->config->re_filterfile[fileid], linenum); } freez(buf);