[dovecot-cvs] dovecot/src/lib-imap imap-bodystructure.c,1.47,1.48
cras at dovecot.org
cras at dovecot.org
Sun Jul 18 05:25:08 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/imap imap-fetch-body-section.c, 1.27,
1.28 imap-fetch.c, 1.20, 1.21 imap-fetch.h, 1.6,
1.7 imap-sort.c, 1.13, 1.14 imap-thread.c, 1.10, 1.11
- Next message: [dovecot-cvs] dovecot/src/lib-mail istream-header-filter.c, 1.2,
1.3 istream-header-filter.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-imap
In directory talvi:/tmp/cvs-serv3398/lib-imap
Modified Files:
imap-bodystructure.c
Log Message:
Header caching redesigned. New design allows caching decisions per field, so
they can be divided to temporary/permanent. Cached headers are now always
returned in original order, old code didn't guarantee it. Some other caching
changes. (still missing code to store changes in caching decisions)
Index: imap-bodystructure.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-bodystructure.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- imap-bodystructure.c 8 Jul 2004 20:26:15 -0000 1.47
+++ imap-bodystructure.c 18 Jul 2004 02:25:06 -0000 1.48
@@ -350,24 +350,27 @@
string_t *str, int extended)
{
struct message_part_body_data *data = part->context;
+ int text;
if (data == NULL) {
/* there was no content headers, use an empty structure */
data = t_new(struct message_part_body_data, 1);
}
- if (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822)
+ if (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) {
str_append(str, "\"message\" \"rfc822\"");
- else {
+ text = FALSE;
+ } else {
/* "content type" "subtype" */
+ text = data->content_type == NULL ||
+ strcasecmp(data->content_type, "\"text\"") == 0;
str_append(str, NVL(data->content_type, "\"text\""));
str_append_c(str, ' ');
if (data->content_subtype != NULL)
str_append(str, data->content_subtype);
else {
- if (data->content_type == NULL ||
- strcasecmp(data->content_type, "\"text\"") == 0)
+ if (text)
str_append(str, "\"plain\"");
else
str_append(str, "\"unknown\"");
@@ -378,8 +381,7 @@
/* ("content type param key" "value" ...) */
str_append_c(str, ' ');
if (data->content_type_params == NULL) {
- if (data->content_type != NULL &&
- strncasecmp(data->content_type, "\"text\"", 6) != 0)
+ if (!text)
str_append(str, "NIL");
else
str_append(str, "("DEFAULT_CHARSET")");
@@ -395,7 +397,7 @@
NVL(data->content_transfer_encoding, "\"7bit\""),
part->body_size.virtual_size);
- if (part->flags & MESSAGE_PART_FLAG_TEXT) {
+ if (text) {
/* text/.. contains line count */
str_printfa(str, " %u", part->body_size.lines);
} else if (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) {
- Previous message: [dovecot-cvs] dovecot/src/imap imap-fetch-body-section.c, 1.27,
1.28 imap-fetch.c, 1.20, 1.21 imap-fetch.h, 1.6,
1.7 imap-sort.c, 1.13, 1.14 imap-thread.c, 1.10, 1.11
- Next message: [dovecot-cvs] dovecot/src/lib-mail istream-header-filter.c, 1.2,
1.3 istream-header-filter.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list