aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/abstract
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-20 22:09:26 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-20 22:09:26 -0700
commit798a4b1117527acc1de523b13577d86fe7df990b (patch)
tree5fd41151591e2842b9bf32312fd280977be851c4 /src/core/abstract
parentd9738cdf2c7e42449ad1ea5e5d69c479b4505090 (diff)
Remove case of Comment and Keyword headers.
Diffstat (limited to 'src/core/abstract')
-rw-r--r--src/core/abstract/MCMessageHeader.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/core/abstract/MCMessageHeader.cc b/src/core/abstract/MCMessageHeader.cc
index b45b0a4e..c1ee43f5 100644
--- a/src/core/abstract/MCMessageHeader.cc
+++ b/src/core/abstract/MCMessageHeader.cc
@@ -354,7 +354,7 @@ void MessageHeader::importHeadersData(Data * data)
int r;
cur_token = 0;
- r = mailimf_fields_parse(data->bytes(), data->length(), &cur_token, &fields);
+ r = mailimf_envelope_and_optional_fields_parse(data->bytes(), data->length(), &cur_token, &fields);
if (r != MAILIMF_NO_ERROR) {
return;
}
@@ -494,18 +494,6 @@ void MessageHeader::importIMFFields(struct mailimf_fields * fields)
setReferences(msgids);
}
break;
- case MAILIMF_FIELD_COMMENTS:
- // Set only if comments is not set
- // TODO: Per RFC5322, multiple comments fields are allowed, should that here
- if (headerValueForName(MCSTR("Comments")) == NULL) {
- char * comments;
- String * str;
-
- comments = field->fld_data.fld_comments->cm_value;
- str = String::stringWithUTF8Characters(comments);
- addHeader(MCSTR("Comments"), str);
- }
- break;
case MAILIMF_FIELD_OPTIONAL_FIELD:
char * fieldName;
String * fieldNameStr;
@@ -522,10 +510,9 @@ void MessageHeader::importIMFFields(struct mailimf_fields * fields)
addHeader(fieldNameStr, fieldValueStr);
}
break;
- case MAILIMF_FIELD_KEYWORDS:
- // TODO: need deal with non-string headers in mExtraHeaders since Keywords is a list
- break;
default:
+ // It won't happen with mailimf_envelope_and_optional_fields_parse().
+ MCAssert(0);
break;
}
cur = clist_next(cur);