]> source.dussan.org Git - rspamd.git/commitdiff
* Fix stripping header when matching raw headers
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 14 May 2009 15:52:45 +0000 (19:52 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 14 May 2009 15:52:45 +0000 (19:52 +0400)
src/plugins/regexp.c

index 8535c94f73d9f6811e0f8d66cc9b55045e134949..1b109bf55ec2d2ca5cd7ae27162a6be4d1b3dd68 100644 (file)
@@ -226,6 +226,7 @@ find_raw_header_pos (const char *headers, const char *headerv)
                                /* Find semicolon */
                                p += headerlen;
                                if (*p == ':') {
+                                       while (*p && g_ascii_isspace (*(++p)));
                                        return p;
                                }
                        }
@@ -352,8 +353,6 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task)
                                task_cache_add (task, re, 0);
                                return 0;
                        }
-                       /* Skip header name and start matching after regexp */
-                       headerv += strlen (re->header) + 1;
                        /* Now the main problem is to find position of end of raw header */
                        c = headerv;
                        while (*c) {