]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mail_get_*header*() didn't remove leading whitespace for headers from...
authorTimo Sirainen <tss@iki.fi>
Wed, 20 Nov 2013 12:37:44 +0000 (14:37 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 20 Nov 2013 12:37:44 +0000 (14:37 +0200)
But it was removed when the headers were found by parsing the full header.

src/lib-storage/index/index-mail-headers.c

index 8be30b792bb3c4b0fe2d603e10cc6f6e51a0a765..6b075b30f7f77f4c65191bd5bb16db867cb675f3 100644 (file)
@@ -653,7 +653,8 @@ index_mail_get_raw_headers(struct index_mail *mail, const char *field,
        /* cached. skip "header name: " parts in dest. */
        for (i = 0; i < len; i++) {
                if (data[i] == ':') {
-                       if (i+1 != len && data[++i] == ' ') i++;
+                       while (IS_LWSP(data[i+1])) i++;
+                       if (i+1 != len) i++;
 
                        /* @UNSAFE */
                        len = get_header_size(dest, i);