From: <no...@so...> - 2008-04-26 10:34:14
|
Update of /cvsroot/ijbswa/current In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30056 Modified Files: cgisimple.c ChangeLog Log Message: If zlib support is unavailable and there are content filters active but the prevent-compression action is disabled, include a warning on the show-url-info page that compression might prevent filtering. Index: cgisimple.c =================================================================== RCS file: /cvsroot/ijbswa/current/cgisimple.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- cgisimple.c 25 Apr 2008 13:33:56 -0000 1.71 +++ cgisimple.c 26 Apr 2008 10:34:15 -0000 1.72 @@ -36,6 +36,11 @@ * * Revisions : * $Log$ + * Revision 1.72 2008/04/26 10:34:15 fabiankeil + * If zlib support is unavailable and there are content filters active + * but the prevent-compression action is disabled, include a warning + * on the show-url-info page that compression might prevent filtering. + * * Revision 1.71 2008/04/25 13:33:56 fabiankeil * - Factor cgi_show_file() out of cgi_show_status(). * - Adjust cgi_show_status()'s parameter description to match reality. @@ -1686,6 +1691,23 @@ } #endif /* FEATURE_CGI_EDIT_ACTIONS */ + /* + * If zlib support is available, if no content filters + * are enabled or if the prevent-compression action is enabled, + * suppress the "compression could prevent filtering" warning. + * + * XXX: Change content_filters_enabled()'s prototype so we can + * use it here. + */ +#ifndef FEATURE_ZLIB + if ((list_is_empty(action->multi[ACTION_MULTI_FILTER]) + && !(action->flags & ACTION_DEANIMATE)) + || (action->flags & ACTION_NO_COMPRESSION)) +#endif + { + if (!err) err = map_block_killer(exports, "filters-might-be-ineffective"); + } + if (err || map(exports, "matches", 1, matches , 0)) { free_current_action(action); Index: ChangeLog =================================================================== RCS file: /cvsroot/ijbswa/current/ChangeLog,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- ChangeLog 24 Apr 2008 16:12:38 -0000 1.83 +++ ChangeLog 26 Apr 2008 10:34:16 -0000 1.84 @@ -45,6 +45,10 @@ interesting if you are using large action files or regularly use Privoxy-Regression-Test while running Privoxy through Valgrind, for stock configuration files it doesn't really matter. +- If zlib support is unavailable and there are content + filters active but the prevent-compression action is disabled, + the show-url-info page includes a warning that compression + might prevent filtering. - The obsolete kill-popups action has been removed as the PCRS-based popup filters can do the same and are less unreliable. |