]> source.dussan.org Git - rspamd.git/commitdiff
Fix header name tokens setup.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 15 Oct 2015 12:57:12 +0000 (13:57 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 15 Oct 2015 12:57:12 +0000 (13:57 +0100)
src/libutil/http.c

index 2f618164a33e4ed90ebe03a9a7bccf1c2e0535ee..1dd22f309bca2446d8c7ac4af7568964859dd641 100644 (file)
@@ -517,6 +517,7 @@ rspamd_http_finish_header (struct rspamd_http_connection *conn,
                        priv->header->name->len - 4;
        priv->header->value->begin = priv->header->combined->str +
                        priv->header->name->len + 2;
+       priv->header->name->begin = priv->header->combined->str;
        DL_APPEND (priv->msg->headers, priv->header);
 
        rspamd_http_check_special_header (conn, priv);
@@ -577,7 +578,6 @@ rspamd_http_on_header_value (http_parser * parser,
                priv->new_header = TRUE;
                priv->header->combined = rspamd_fstring_append (priv->header->combined,
                                ": ", 2);
-               priv->header->name->begin = priv->header->combined->str;
                priv->header->name->len = priv->header->combined->len - 2;
        }