]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Don't save empty header lists
authorTimo Sirainen <tss@iki.fi>
Tue, 21 Oct 2003 03:35:43 +0000 (06:35 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 21 Oct 2003 03:35:43 +0000 (06:35 +0300)
--HG--
branch : HEAD

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

index 9dfbb03aee5cc16cd76b4b5cfd76907715934db4..184a9606263b2757b3bc42c4e8b5f4274dc6f4ce 100644 (file)
@@ -539,8 +539,12 @@ int index_mail_parse_headers(struct index_mail *mail)
                                return FALSE;
                }
 
-               data->header_save = TRUE;
-               data->header_save_idx = idx;
+               /* it's possible that we're parsing headers without wanting
+                  to save any of them */
+               if (buffer_get_used_size(data->headers) != 0) {
+                       data->header_save = TRUE;
+                       data->header_save_idx = idx;
+               }
        }
 
        data->bodystructure_header_parse = data->bodystructure_header_want;