diff options
author | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-12-19 01:59:57 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-12-19 01:59:57 +0800 |
commit | fceffac25c36de5195fe7b9f6d9faf32d54b41a1 (patch) | |
tree | 1d8f92a33deadb2ac04d86be6d138f101f98de2b | |
parent | 5efeb3f1bf428b2ef0430b5b1fd4ca5edbca163d (diff) | |
download | gsoc2013-evolution-fceffac25c36de5195fe7b9f6d9faf32d54b41a1.tar.gz gsoc2013-evolution-fceffac25c36de5195fe7b9f6d9faf32d54b41a1.tar.zst gsoc2013-evolution-fceffac25c36de5195fe7b9f6d9faf32d54b41a1.zip |
revert my "simplification" of the last commit, it was broken - I must have been brain-dead when I wrote it.
svn path=/trunk/; revision=15149
-rw-r--r-- | camel/camel-mime-part-utils.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c index 08787df2cd..8367cecf37 100644 --- a/camel/camel-mime-part-utils.c +++ b/camel/camel-mime-part-utils.c @@ -194,7 +194,7 @@ static void simple_data_wrapper_construct_from_parser (CamelDataWrapper *dw, CamelMimeParser *mp) { CamelMimeFilter *fdec = NULL, *fcrlf = NULL; - CamelMimeFilterBasicType enctype; + CamelMimeFilterBasicType enctype = 0; int len, decid = -1, crlfid = -1; struct _header_content_type *ct; const char *charset = NULL; @@ -207,11 +207,20 @@ simple_data_wrapper_construct_from_parser (CamelDataWrapper *dw, CamelMimeParser /* first, work out conversion, if any, required, we dont care about what we dont know about */ encoding = header_content_encoding_decode (camel_mime_parser_header (mp, "Content-Transfer-Encoding", NULL)); if (encoding) { - enctype = camel_mime_part_encoding_from_string (encoding); + if (!strcasecmp (encoding, "base64")) { + d(printf("Adding base64 decoder ...\n")); + enctype = CAMEL_MIME_FILTER_BASIC_BASE64_DEC; + } else if (!strcasecmp (encoding, "quoted-printable")) { + d(printf("Adding quoted-printable decoder ...\n")); + enctype = CAMEL_MIME_FILTER_BASIC_QP_DEC; + } else if (!strcasecmp (encoding, "x-uuencode")) { + d(printf("Adding uudecoder ...\n")); + enctype = CAMEL_MIME_FILTER_BASIC_UU_DEC; + } g_free (encoding); - if (enctype != CAMEL_MIME_PART_ENCODING_DEFAULT) { - fdec = (CamelMimeFilter *) camel_mime_filter_basic_new_type (enctype); + if (enctype != 0) { + fdec = (CamelMimeFilter *)camel_mime_filter_basic_new_type(enctype); decid = camel_mime_parser_filter_add (mp, fdec); } } |