ssl_send_certificate_error(): Remove a 'dead nested assignment'
[privoxy.git] / actions.c
index 95646b6..379c5e9 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -828,8 +828,12 @@ int update_action_bits_for_tag(struct client_state *csp, const char *tag)
             continue;
          }
 
+#ifdef HAVE_PCRE2
+         if (pcre2_pattern_matches(b->url->pattern.tag_regex, tag))
+#else
          /* and check if one of the tag patterns matches the tag, */
          if (0 == regexec(b->url->pattern.tag_regex, tag, 0, NULL, 0))
+#endif
          {
             /* if it does, update the action bit map, */
             if (merge_current_action(csp->action, b->action))
@@ -884,7 +888,11 @@ jb_err check_negative_tag_patterns(struct client_state *csp, unsigned int flag)
          }
          for (tag = csp->tags->first; NULL != tag; tag = tag->next)
          {
+#ifdef HAVE_PCRE2
+            if (pcre2_pattern_matches(b->url->pattern.tag_regex, tag->str))
+#else
             if (0 == regexec(b->url->pattern.tag_regex, tag->str, 0, NULL, 0))
+#endif
             {
                /*
                 * The pattern matches at least one tag, thus the action
@@ -1111,14 +1119,18 @@ static const char *filter_type_to_string(enum filter_type filter_type)
       return "client-header tagger";
    case FT_SERVER_HEADER_TAGGER:
       return "server-header tagger";
-#ifdef FEATURE_EXTERNAL_FILTERS
-   case FT_EXTERNAL_CONTENT_FILTER:
-      return "external content filter";
-#endif
    case FT_SUPPRESS_TAG:
       return "suppress tag filter";
    case FT_CLIENT_BODY_FILTER:
       return "client body filter";
+   case FT_CLIENT_BODY_TAGGER:
+      return "client body tagger";
+   case FT_ADD_HEADER:
+      return "add-header action";
+#ifdef FEATURE_EXTERNAL_FILTERS
+   case FT_EXTERNAL_CONTENT_FILTER:
+      return "external content filter";
+#endif
    case FT_INVALID_FILTER:
       return "invalid filter type";
    }