Improve the warning messages that get logged if the action files
authorFabian Keil <fk@fabiankeil.de>
Fri, 4 Jan 2008 17:43:45 +0000 (17:43 +0000)
committerFabian Keil <fk@fabiankeil.de>
Fri, 4 Jan 2008 17:43:45 +0000 (17:43 +0000)
"enable" filters but no filters of that type have been loaded.

filters.c
parsers.c

index 292db4b..388daf4 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -1,4 +1,4 @@
-const char filters_rcs[] = "$Id: filters.c,v 1.96 2007/10/19 16:53:28 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.97 2007/11/30 15:37:03 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
@@ -40,6 +40,9 @@ const char filters_rcs[] = "$Id: filters.c,v 1.96 2007/10/19 16:53:28 fabiankeil
  *
  * Revisions   :
  *    $Log: filters.c,v $
+ *    Revision 1.97  2007/11/30 15:37:03  fabiankeil
+ *    Use freez instead of free.
+ *
  *    Revision 1.96  2007/10/19 16:53:28  fabiankeil
  *    Add helper function to check if any content filters are enabled.
  *
@@ -1805,7 +1808,8 @@ static char *pcrs_filter_response(struct client_state *csp)
 
    if (0 == found_filters)
    {
-      log_error(LOG_LEVEL_ERROR, "Unable to get current state of regexp filtering.");
+      log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: "
+         "content filtering enabled, but no content filters available.");
       return(NULL);
    }
 
index 5e4c86f..a339d47 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -1,4 +1,4 @@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.118 2007/12/28 16:56:35 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.119 2007/12/28 18:32:51 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@ -44,6 +44,14 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.118 2007/12/28 16:56:35 fabiankei
  *
  * Revisions   :
  *    $Log: parsers.c,v $
+ *    Revision 1.119  2007/12/28 18:32:51  fabiankeil
+ *    In server_content_type():
+ *    - Don't require leading white space when detecting image content types.
+ *    - Change '... not replaced ...' message to sound less crazy if the text
+ *      type actually is 'text/plain'.
+ *    - Mark the 'text/plain == binary data' assumption for removal.
+ *    - Remove a bunch of trailing white space.
+ *
  *    Revision 1.118  2007/12/28 16:56:35  fabiankeil
  *    Minor server_content_disposition() changes:
  *    - Don't regenerate the header name all lower-case.
@@ -1695,7 +1703,8 @@ static jb_err header_tagger(struct client_state *csp, char *header)
 
    if (0 == found_filters)
    {
-      log_error(LOG_LEVEL_ERROR, "Unable to get current state of regex tagging.");
+      log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: "
+         "tagging enabled, but no taggers available.");
       return(JB_ERR_OK);
    }
 
@@ -1912,7 +1921,8 @@ static jb_err filter_header(struct client_state *csp, char **header)
 
    if (0 == found_filters)
    {
-      log_error(LOG_LEVEL_ERROR, "Unable to get current state of regexp filtering.");
+      log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: "
+         "header filtering enabled, but no matching filters available.");
       return(JB_ERR_OK);
    }