aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/rfc822
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2015-01-22 21:08:42 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2015-01-22 21:08:42 -0800
commit860ecfd058607b648be998dc9c2ffc2daa6b25bf (patch)
tree9a65243b52f5f3756b2688035353c2f141828282 /src/core/rfc822
parent85b49c5af154126dda792081d1169e4ff04ac83b (diff)
Fixed #1031: don't add 'name' and 'charset' fields to content type parameters because they're already at top-level
Diffstat (limited to 'src/core/rfc822')
-rw-r--r--src/core/rfc822/MCAttachment.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/rfc822/MCAttachment.cpp b/src/core/rfc822/MCAttachment.cpp
index cbc66a39..99f3caa0 100644
--- a/src/core/rfc822/MCAttachment.cpp
+++ b/src/core/rfc822/MCAttachment.cpp
@@ -576,7 +576,9 @@ Attachment * Attachment::attachmentWithSingleMIME(struct mailmime * mime)
while (iter != NULL) {
param = (struct mailmime_parameter *) clist_content(iter);
if (param != NULL) {
- result->setContentTypeParameter(String::stringWithUTF8Characters(param->pa_name), String::stringWithUTF8Characters(param->pa_value));
+ if ((strcasecmp("name", param->pa_name) != 0) && (strcasecmp("charset", param->pa_name) != 0)) {
+ result->setContentTypeParameter(String::stringWithUTF8Characters(param->pa_name), String::stringWithUTF8Characters(param->pa_value));
+ }
}
iter = clist_next(iter);
}