csp->headers->last = csp->https_headers->last;
/*
- * Start with fresh tags. Already exising tags may
+ * Start with fresh tags. Already existing tags may
* be set again. This is necessary to overrule
* URL-based patterns.
*/
err = sed(csp, FILTER_CLIENT_HEADERS);
csp->flags |= CSP_FLAG_CLIENT_HEADER_PARSING_DONE;
+ /*
+ * Update the last header which may have changed
+ * due to header additions,
+ */
+ csp->https_headers->last = csp->headers->last;
+
csp->headers->first = headers.first;
csp->headers->last = headers.last;