- Use descriptive variable names.
[privoxy.git] / filters.c
index 0d1d544..b7a1ff8 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -1,4 +1,4 @@
-const char filters_rcs[] = "$Id: filters.c,v 1.104 2008/03/27 18:27:24 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.106 2008/05/03 16:40:44 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
@@ -40,6 +40,15 @@ const char filters_rcs[] = "$Id: filters.c,v 1.104 2008/03/27 18:27:24 fabiankei
  *
  * Revisions   :
  *    $Log: filters.c,v $
+ *    Revision 1.106  2008/05/03 16:40:44  fabiankeil
+ *    Change content_filters_enabled()'s parameter from
+ *    csp->action to action so it can be also used in the
+ *    CGI code. Don't bother checking if there are filters
+ *    loaded, as that's somewhat besides the point.
+ *
+ *    Revision 1.105  2008/03/28 15:13:39  fabiankeil
+ *    Remove inspect-jpegs action.
+ *
  *    Revision 1.104  2008/03/27 18:27:24  fabiankeil
  *    Remove kill-popups action.
  *
@@ -1732,7 +1741,7 @@ int is_untrusted_url(const struct client_state *csp)
    /*
     * If not, do we maybe trust its referrer?
     */
-   err = parse_http_url(referer, rhttp, csp);
+   err = parse_http_url(referer, rhttp, REQUIRE_PROTOCOL);
    if (err)
    {
       return 1;
@@ -2660,16 +2669,15 @@ struct http_response *direct_response(struct client_state *csp)
  *                enabled for the current request.
  *
  * Parameters  :  
- *          1  :  csp = Current client state (buffers, headers, etc...)
+ *          1  :  action = Action spec to check.
  *
  * Returns     :  TRUE for yes, FALSE otherwise
  *
  *********************************************************************/
-inline int content_filters_enabled(const struct client_state *csp)
+int content_filters_enabled(const struct current_action_spec *action)
 {
-   return (((csp->rlist != NULL) &&
-      (!list_is_empty(csp->action->multi[ACTION_MULTI_FILTER]))) ||
-      (csp->action->flags & ACTION_DEANIMATE));
+   return ((action->flags & ACTION_DEANIMATE) ||
+      !list_is_empty(action->multi[ACTION_MULTI_FILTER]));
 }
 
 /*