#include <ctype.h>
#include <assert.h>
-#if !defined(_WIN32) && !defined(__OS2__)
+#if !defined(_WIN32)
#include <unistd.h>
#endif
destroy_list(csp->https_headers);
#endif
destroy_list(csp->tags);
+#ifdef FEATURE_CLIENT_TAGS
+ destroy_list(csp->client_tags);
+#endif
free_current_action(csp->action);
}
new_filter = FT_EXTERNAL_CONTENT_FILTER;
}
#endif
+ else if (strncmp(buf, "CLIENT-BODY-FILTER:", 19) == 0)
+ {
+ new_filter = FT_CLIENT_BODY_FILTER;
+ }
/*
* If this is the head of a new filter block, make it a
new_bl->name = chomp(buf + 16);
}
#endif
+ else if (new_filter == FT_CLIENT_BODY_FILTER)
+ {
+ new_bl->name = chomp(buf + 19);
+ }
else
{
new_bl->name = chomp(buf + 21);
/*
* If this is the first filter block, chain it
- * to the file_list rather than its (nonexistant)
+ * to the file_list rather than its (nonexistent)
* predecessor
*/
if (fs->f == NULL)
bl = new_bl;
log_error(LOG_LEVEL_RE_FILTER, "Reading in filter \"%s\" (\"%s\")", bl->name, bl->description);
-
+#ifdef FEATURE_EXTENDED_STATISTICS
+ register_filter_for_statistics(bl->name);
+#endif
freez(buf);
continue;
}
/* Save the code as "pattern", but do not compile anything. */
if (bl->patterns->first != NULL)
{
- log_error(LOG_LEVEL_FATAL, "External filter '%s' contains several jobss. "
+ log_error(LOG_LEVEL_FATAL, "External filter '%s' contains several jobs. "
"Did you forget to escape a line break?",
bl->name);
}
}
else
{
- log_error(LOG_LEVEL_ERROR, "Ignoring job %s outside filter block in %s, line %d",
+ log_error(LOG_LEVEL_ERROR,
+ "Ignoring job %s outside filter block in %s, line %lu",
buf, csp->config->re_filterfile[fileid], linenum);
}
freez(buf);