-const char filters_rcs[] = "$Id: filters.c,v 1.94 2007/09/29 13:20:20 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.95 2007/10/17 19:31:20 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
*
* Revisions :
* $Log: filters.c,v $
+ * Revision 1.95 2007/10/17 19:31:20 fabiankeil
+ * Omitting the zero chunk that ends the chunk transfer encoding seems
+ * to be the new black. Log the problem and continue filtering anyway.
+ *
* Revision 1.94 2007/09/29 13:20:20 fabiankeil
* Remove two redundant and one useless log messages.
*
}
+/*********************************************************************
+ *
+ * Function : content_filters_enabled
+ *
+ * Description : Checks whether there are any content filters
+ * enabled for the current request.
+ *
+ * Parameters :
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ *
+ * Returns : TRUE for yes, FALSE otherwise
+ *
+ *********************************************************************/
+inline int content_filters_enabled(const struct client_state *csp)
+{
+ return (((csp->rlist != NULL) &&
+ (!list_is_empty(csp->action->multi[ACTION_MULTI_FILTER]))) ||
+ (csp->action->flags & (ACTION_DEANIMATE|ACTION_JPEG_INSPECT|ACTION_NO_POPUPS)));
+}
+
/*
Local Variables:
tab-width: 3
#ifndef FILTERS_H_INCLUDED
#define FILTERS_H_INCLUDED
-#define FILTERS_H_VERSION "$Id: filters.h,v 1.29 2007/09/28 16:38:55 fabiankeil Exp $"
+#define FILTERS_H_VERSION "$Id: filters.h,v 1.30 2007/09/29 10:21:16 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.h,v $
*
* Revisions :
* $Log: filters.h,v $
+ * Revision 1.30 2007/09/29 10:21:16 fabiankeil
+ * - Move get_filter_function() from jcc.c to filters.c
+ * so the filter functions can be static.
+ * - Don't bother filtering body-less responses.
+ *
* Revision 1.29 2007/09/28 16:38:55 fabiankeil
* - Execute content filters through execute_content_filter().
* - Add prepare_for_filtering() so filter functions don't have to
extern pcrs_job *compile_dynamic_pcrs_job_list(const struct client_state *csp, const struct re_filterfile_spec *b);
+extern inline int content_filters_enabled(const struct client_state *csp);
/*
* Handling Max-Forwards: