From: Fabian Keil Date: Sun, 27 May 2007 12:39:32 +0000 (+0000) Subject: Adjust "X-Filter: No" to disable dedicated header filters. X-Git-Tag: v_3_0_7~234 X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/static/gitweb.js?a=commitdiff_plain;h=240f84af9dd1265c800ed59ef1ece6d27e33303e;p=privoxy.git Adjust "X-Filter: No" to disable dedicated header filters. --- diff --git a/parsers.c b/parsers.c index 15153026..1eec5976 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.100 2007/04/30 15:53:11 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.101 2007/05/14 10:16:41 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -44,6 +44,9 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.100 2007/04/30 15:53:11 fabiankei * * Revisions : * $Log: parsers.c,v $ + * Revision 1.101 2007/05/14 10:16:41 fabiankeil + * Streamline client_cookie_adder(). + * * Revision 1.100 2007/04/30 15:53:11 fabiankeil * Make sure filters with dynamic jobs actually use them. * @@ -1764,6 +1767,11 @@ jb_err filter_header(struct client_state *csp, char **header) int wanted_filter_type; int multi_action_index; + if (csp->flags & CSP_FLAG_NO_FILTERING) + { + return JB_ERR_OK; + } + if (csp->flags & CSP_FLAG_CLIENT_HEADER_PARSING_DONE) { wanted_filter_type = FT_SERVER_HEADER_FILTER; @@ -3370,9 +3378,8 @@ jb_err client_x_filter(struct client_state *csp, char **header) } else { - csp->content_type = CT_TABOO; - csp->action->flags &= ~ACTION_FILTER_SERVER_HEADERS; - csp->action->flags &= ~ACTION_FILTER_CLIENT_HEADERS; + csp->content_type = CT_TABOO; /* XXX: This hack shouldn't be necessary */ + csp->flags |= CSP_FLAG_NO_FILTERING; log_error(LOG_LEVEL_HEADER, "Accepted the client's request to fetch without filtering."); } log_error(LOG_LEVEL_HEADER, "Crunching %s", *header);