diff options
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r-- | camel/camel-mime-part.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 86ac9c0b13..e553e60257 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -494,13 +494,17 @@ write_to_stream(CamelDataWrapper *data_wrapper, CamelStream *stream) if (mp->headers) { struct _header_raw *h = mp->headers; + char *val; while (h) { - if (h->value == NULL){ + val = h->value; + if (val == NULL) { g_warning("h->value is NULL here for %s", h->name); count = 0; } else { - count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(h->value[0]) ? ":" : ": ", h->value); + val = header_fold(val, strlen(h->name)); + count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(val[0]) ? ":" : ": ", val); + g_free(val); } if (count == -1) return -1; |