From: Fabian Keil Date: Sat, 29 Mar 2008 12:14:27 +0000 (+0000) Subject: Remove send-wafer and send-vanilla-wafer actions. X-Git-Tag: v_3_0_9~179 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=41a08949498020a8f9ec18c08e16141057ebd546 Remove send-wafer and send-vanilla-wafer actions. --- diff --git a/ChangeLog b/ChangeLog index 3ece1bc5..fce1e123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,9 @@ ChangeLog for Privoxy PCRS-based popup filters can do the same and are less unreliable. - The inspect-jpegs action has been removed. +- The send-wafer and send-vanilla-wafer actions have been removed. + They weren't particular useful and their behaviour could be emulated + with add-header anyway. *** Version 3.0.8 *** diff --git a/actionlist.h b/actionlist.h index 5bbdc92b..6986acc0 100644 --- a/actionlist.h +++ b/actionlist.h @@ -39,6 +39,9 @@ * * Revisions : * $Log: actionlist.h,v $ + * Revision 1.32 2008/03/28 15:13:42 fabiankeil + * Remove inspect-jpegs action. + * * Revision 1.31 2008/03/27 18:27:20 fabiankeil * Remove kill-popups action. * @@ -237,8 +240,6 @@ DEFINE_CGI_PARAM_RADIO ("overwrite-last-modified", ACTION_OVERWRITE_LAST_MO DEFINE_ACTION_BOOL ("prevent-compression", ACTION_NO_COMPRESSION) DEFINE_ACTION_STRING ("redirect", ACTION_REDIRECT, ACTION_STRING_REDIRECT) DEFINE_CGI_PARAM_NO_RADIO("redirect", ACTION_REDIRECT, ACTION_STRING_REDIRECT, "http://localhost/") -DEFINE_ACTION_BOOL ("send-vanilla-wafer", ACTION_VANILLA_WAFER) -DEFINE_ACTION_MULTI ("send-wafer", ACTION_MULTI_WAFER) DEFINE_ACTION_MULTI ("server-header-filter", ACTION_MULTI_SERVER_HEADER_FILTER) DEFINE_ACTION_MULTI ("server-header-tagger", ACTION_MULTI_SERVER_HEADER_TAGGER) DEFINE_ACTION_BOOL ("session-cookies-only", ACTION_NO_COOKIE_KEEP) @@ -277,8 +278,6 @@ DEFINE_ACTION_BOOL ("no-compression", ACTION_NO_COMPRESSION) DEFINE_ACTION_BOOL ("no-cookies-keep", ACTION_NO_COOKIE_KEEP) DEFINE_ACTION_BOOL ("no-cookies-read", ACTION_NO_COOKIE_READ) DEFINE_ACTION_BOOL ("no-cookies-set", ACTION_NO_COOKIE_SET) -DEFINE_ACTION_BOOL ("vanilla-wafer", ACTION_VANILLA_WAFER) -DEFINE_ACTION_MULTI ("wafer", ACTION_MULTI_WAFER) #endif /* if DEFINE_ACTION_ALIAS */ #undef DEFINE_ACTION_MULTI diff --git a/actions.c b/actions.c index d6d9d9a6..7de2fef8 100644 --- a/actions.c +++ b/actions.c @@ -1,4 +1,4 @@ -const char actions_rcs[] = "$Id: actions.c,v 1.47 2008/03/28 15:13:37 fabiankeil Exp $"; +const char actions_rcs[] = "$Id: actions.c,v 1.48 2008/03/28 18:17:14 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/actions.c,v $ @@ -33,6 +33,10 @@ const char actions_rcs[] = "$Id: actions.c,v 1.47 2008/03/28 15:13:37 fabiankeil * * Revisions : * $Log: actions.c,v $ + * Revision 1.48 2008/03/28 18:17:14 fabiankeil + * In action_used_to_be_valid(), loop through an array of formerly + * valid actions instead of using an OR-chain of strcmpic() calls. + * * Revision 1.47 2008/03/28 15:13:37 fabiankeil * Remove inspect-jpegs action. * @@ -657,7 +661,11 @@ static int action_used_to_be_valid(const char *action) static const char *formerly_valid_actions[] = { "inspect-jpegs", "kill-popups", - "treat-forbidden-connects-like-blocks" + "send-vanilla-wafer", + "send-wafer", + "treat-forbidden-connects-like-blocks", + "vanilla-wafer", + "wafer" }; int i; diff --git a/default.action.master b/default.action.master index a30e2c20..bb64ac3f 100644 --- a/default.action.master +++ b/default.action.master @@ -9,7 +9,7 @@ # # File : $Source: /cvsroot/ijbswa/current/default.action.master,v $ # -# $Id: default.action.master,v 1.120 2008/03/27 18:27:36 fabiankeil Exp $ +# $Id: default.action.master,v 1.121 2008/03/28 15:13:39 fabiankeil Exp $ # # Requires : This version requires Privoxy v3.0.9 or later due to # syntax changes. @@ -176,7 +176,7 @@ # +name{param} # enable and set parameter to "param" # -name # disable # -# Multi-value (e.g. "add-header", "send-wafer"): +# Multi-value (e.g. "add-header", "filter"): # +name{param} # enable and add parameter "param" # -name{param} # remove the parameter "param" # -name # disable totally @@ -472,17 +472,6 @@ # another location and the browser should get it from the specified # URL. # -# +send-vanilla-wafer -# This action only applies if you are using a jarfile. It sends a -# cookie to every site stating that you do not accept any copyright -# on cookies sent to you, and asking them not to track you. Of -# course, this is a (relatively) unique header they could use to -# track you. -# -# +send-wafer{name=value} -# This allows you to add an arbitrary cookie. Specify it multiple -# times in order to add several cookies. -# ############################################################################# ############################################################################# diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index d2f7a6c7..b9b5a6c4 100644 --- a/doc/source/user-manual.sgml +++ b/doc/source/user-manual.sgml @@ -33,7 +33,7 @@ This file belongs into ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/ - $Id: user-manual.sgml,v 2.67 2008/03/27 18:31:21 fabiankeil Exp $ + $Id: user-manual.sgml,v 2.68 2008/03/28 15:13:43 fabiankeil Exp $ Copyright (C) 2001-2008 Privoxy Developers http://www.privoxy.org/ See LICENSE. @@ -59,7 +59,7 @@ -$Id: user-manual.sgml,v 2.67 2008/03/27 18:31:21 fabiankeil Exp $ +$Id: user-manual.sgml,v 2.68 2008/03/28 15:13:43 fabiankeil Exp $ - -send-vanilla-wafer - - - - Typical use: - - - Feed log analysis scripts with useless data. - - - - - - Effect: - - - Sends a cookie with each request stating that you do not accept any copyright - on cookies sent to you, and asking the site operator not to track you. - - - - - - Type: - - - Boolean. - - - - - Parameter: - - - N/A - - - - - - Notes: - - - The vanilla wafer is a (relatively) unique header and could conceivably be used to track you. - - - This action is rarely used and not enabled in the default configuration. - - - - - - Example usage: - - - +send-vanilla-wafer - - - - - - - - - - -send-wafer - - - - Typical use: - - - Send custom cookies or feed log analysis scripts with even more useless data. - - - - - - Effect: - - - Sends a custom, user-defined cookie with each request. - - - - - - Type: - - - Multi-value. - - - - - Parameter: - - - A string of the form name=value. - - - - - - Notes: - - - Being multi-valued, multiple instances of this action can apply to the same request, - resulting in multiple cookies being sent. - - - This action is rarely used and not enabled in the default configuration. - - - - - Example usage (section): - - - {+send-wafer{UsingPrivoxy=true}} -my-internal-testing-server.void - - - - - - - server-header-filter @@ -8403,8 +8271,6 @@ In file: user.action [ View ] [ Edit ][ View ] [ Edit ][ View ] [ Edit ]action->flags & ACTION_VANILLA_WAFER)) - && list_is_empty(csp->action->multi[ACTION_MULTI_WAFER])) - { - enlist(csp->action->multi[ACTION_MULTI_WAFER], VANILLA_WAFER); - } - - wafer_list = csp->action->multi[ACTION_MULTI_WAFER]->first; - - if (NULL == wafer_list) - { - /* Nothing to do */ - return JB_ERR_OK; - } - - tmp = strdup("Cookie: "); - - for (wafer = wafer_list; (NULL != tmp) && (NULL != wafer); wafer = wafer->next) - { - if (wafer != wafer_list) - { - /* As this isn't the first wafer, we need a delimiter. */ - string_append(&tmp, "; "); - } - string_join(&tmp, cookie_encode(wafer->str)); - } - - if (tmp == NULL) - { - return JB_ERR_MEMORY; - } - - log_error(LOG_LEVEL_HEADER, "addh: %s", tmp); - err = enlist(csp->headers, tmp); - free(tmp); - return err; -} - - #if 0 /********************************************************************* * diff --git a/project.h b/project.h index 592181e5..21c71d3a 100644 --- a/project.h +++ b/project.h @@ -1,7 +1,7 @@ #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED /** Version string. */ -#define PROJECT_H_VERSION "$Id: project.h,v 1.108 2008/03/27 18:27:36 fabiankeil Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 1.109 2008/03/28 15:13:41 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/project.h,v $ @@ -37,6 +37,9 @@ * * Revisions : * $Log: project.h,v $ + * Revision 1.109 2008/03/28 15:13:41 fabiankeil + * Remove inspect-jpegs action. + * * Revision 1.108 2008/03/27 18:27:36 fabiankeil * Remove kill-popups action. * @@ -1048,8 +1051,8 @@ struct iob #define ACTION_NO_COOKIE_SET 0x00002000UL /** Action bitmap: Override the forward settings in the config file */ #define ACTION_FORWARD_OVERRIDE 0x00004000UL -/** Action bitmap: Send a vanilla wafer. */ -#define ACTION_VANILLA_WAFER 0x00008000UL +/** Action bitmap: Block as empty document */ +#define ACTION_HANDLE_AS_EMPTY_DOCUMENT 0x00008000UL /** Action bitmap: Limit CONNECT requests to safe ports. */ #define ACTION_LIMIT_CONNECT 0x00010000UL /** Action bitmap: Redirect request. */ @@ -1072,8 +1075,6 @@ struct iob #define ACTION_OVERWRITE_LAST_MODIFIED 0x02000000UL /** Action bitmap: Replace or block Accept-Language header */ #define ACTION_HIDE_ACCEPT_LANGUAGE 0x04000000UL -/** Action bitmap: Block as empty document */ -#define ACTION_HANDLE_AS_EMPTY_DOCUMENT 0x08000000UL /** Action string index: How to deanimate GIFs */ @@ -1120,20 +1121,18 @@ struct iob /** Index into current_action_spec::multi[] for headers to add. */ #define ACTION_MULTI_ADD_HEADER 0 -/** Index into current_action_spec::multi[] for headers to add. */ -#define ACTION_MULTI_WAFER 1 /** Index into current_action_spec::multi[] for content filters to apply. */ -#define ACTION_MULTI_FILTER 2 +#define ACTION_MULTI_FILTER 1 /** Index into current_action_spec::multi[] for server-header filters to apply. */ -#define ACTION_MULTI_SERVER_HEADER_FILTER 3 +#define ACTION_MULTI_SERVER_HEADER_FILTER 2 /** Index into current_action_spec::multi[] for client-header filters to apply. */ -#define ACTION_MULTI_CLIENT_HEADER_FILTER 4 +#define ACTION_MULTI_CLIENT_HEADER_FILTER 3 /** Index into current_action_spec::multi[] for client-header tags to apply. */ -#define ACTION_MULTI_CLIENT_HEADER_TAGGER 5 +#define ACTION_MULTI_CLIENT_HEADER_TAGGER 4 /** Index into current_action_spec::multi[] for server-header tags to apply. */ -#define ACTION_MULTI_SERVER_HEADER_TAGGER 6 +#define ACTION_MULTI_SERVER_HEADER_TAGGER 5 /** Number of multi-string actions. */ -#define ACTION_MULTI_COUNT 7 +#define ACTION_MULTI_COUNT 6 /** diff --git a/regression-tests.action b/regression-tests.action index ca4830e7..c6d83ca8 100644 --- a/regression-tests.action +++ b/regression-tests.action @@ -1,5 +1,5 @@ ############################################################################# -# $Id: regression-tests.action,v 1.62 2008/03/28 08:42:51 fk Exp $ +# $Id: regression-tests.action,v 1.63 2008/03/28 19:03:49 fk Exp $ ############################################################################# # # This is a configuration file for Privoxy-Regression-Test. @@ -365,30 +365,6 @@ TAG:^hide-from-header\{siebenzwerge@example.org\}$ } TAG:^prevent-compression$ -####################################################### -# Test send-wafer. -####################################################### - -# Set Header = X-Does-Not-Matter: Foo bar -# Expect Header = Cookie: Tracking+me+is+easy+due+to+my+stupid+wafer+cookie -{\ - +send-wafer{Tracking me is easy due to my stupid wafer cookie}\ - -send-vanilla-wafer \ -} -TAG:^send-wafer\{Tracking me is easy due to my stupid wafer cookie\}$ - -####################################################### -# Test send-vanilla-wafer. -####################################################### - -# Set Header = X-Does-Not-Matter: Foo bar -# Expect Header = Cookie: NOTICE=TO_WHOM_IT_MAY_CONCERN_Do_not_send_me_any_copyrighted_information_other_than_the_document_that_I_am_requesting_or_any_of_its_necessary_components._In_particular_do_not_send_me_any_cookies_that_are_subject_to_a_claim_of_copyright_by_anybody._Take_notice_that_I_refuse_to_be_bound_by_any_license_condition_(copyright_or_otherwise)_applying_to_any_cookie._ -{\ - +send-vanilla-wafer \ - -send-wafer \ -} -TAG:^send-vanilla-wafer$ - ####################################################### # Test content filters which could cause problems with # range requests. diff --git a/templates/edit-actions-for-url b/templates/edit-actions-for-url index 477efdcf..238ee9a3 100644 --- a/templates/edit-actions-for-url +++ b/templates/edit-actions-for-url @@ -32,6 +32,9 @@ # # Revisions : # $Log: edit-actions-for-url,v $ +# Revision 1.53 2008/03/28 15:13:45 fabiankeil +# Remove inspect-jpegs action. +# # Revision 1.52 2008/03/15 14:52:36 fabiankeil # Add CGI editor support for the "disable all filters of this type" # directives "-client-header-filter", "-server-header-filter", @@ -441,18 +444,6 @@ function show_limit_connect_opts(tf) target.style.display = (tf ? "" : "none"); } -function show_send_wafer_opts(tf) -{ - if (document.getElementById) { - target = document.getElementById("send_wafer_opts"); - } else if (document.all) { - target = document.send_wafer_opts; - } else { - return; - } - target.style.display = (tf ? "" : "none"); -} - //--> @@ -1237,41 +1228,6 @@ function show_send_wafer_opts(tf) value="@redirect-param@"> - - - - - send-vanilla-wafer - Adds a special wafer (standard cookie) to all your requests. Not recommended. - - - - - - send-wafer - Adds user-specified cookies. - - -   -   -   -   - Editing the settings for this option, or turning - it on if it was off, is not yet supported using this web-based - editor. -