sed_https(): Clear the existing tags before calling sed()
authorFabian Keil <fk@fabiankeil.de>
Wed, 26 Feb 2020 14:42:48 +0000 (15:42 +0100)
committerFabian Keil <fk@fabiankeil.de>
Fri, 28 Feb 2020 06:31:27 +0000 (07:31 +0100)
This makes sure tagging based on the encrypted client
headers works even if a tag has already been set based
on the unencrypted ones.

Sponsored by: Robert Klemme

parsers.c

index 2812161..6f58c10 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -1215,6 +1215,13 @@ jb_err sed_https(struct client_state *csp)
    csp->headers->first = csp->https_headers->first;
    csp->headers->last  = csp->https_headers->last;
 
    csp->headers->first = csp->https_headers->first;
    csp->headers->last  = csp->https_headers->last;
 
+   /*
+    * Start with fresh tags. Already exising tags may
+    * be set again. This is necessary to overrule
+    * URL-based patterns.
+    */
+   destroy_list(csp->tags);
+
    /*
     * We want client header filters and taggers
     * so temporarly remove the flag.
    /*
     * We want client header filters and taggers
     * so temporarly remove the flag.