Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1255:58041ce0a24c HEAD
Default to 7bit instead of 8bit content-encoding-type.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 25 Feb 2003 22:55:52 +0200 |
parents | c7bb9cc26e1f |
children | cb1782907902 |
files | src/lib-imap/imap-bodystructure.c |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-imap/imap-bodystructure.c Tue Feb 25 21:10:45 2003 +0200 +++ b/src/lib-imap/imap-bodystructure.c Tue Feb 25 22:55:52 2003 +0200 @@ -338,7 +338,16 @@ /* "content type" "subtype" */ str_append(str, NVL(data->content_type, "\"text\"")); str_append_c(str, ' '); - str_append(str, NVL(data->content_subtype, "\"plain\"")); + if (data->content_subtype != NULL) + str_append(str, data->content_subtype); + else { + if (data->content_type == NULL || + strcasecmp(data->content_type, "text") == 0) + str_append(str, "\"plain\""); + else + str_append(str, "\"unknown\""); + + } /* ("content type param key" "value" ...) */ str_append_c(str, ' '); @@ -353,7 +362,7 @@ str_printfa(str, " %s %s %s %"PRIuUOFF_T, NVL(data->content_id, "NIL"), NVL(data->content_description, "NIL"), - NVL(data->content_transfer_encoding, "\"8bit\""), + NVL(data->content_transfer_encoding, "\"7bit\""), part->body_size.virtual_size); if (part->flags & MESSAGE_PART_FLAG_TEXT) {