aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-part.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-06-13 00:49:59 +0800
committerDan Winship <danw@src.gnome.org>2000-06-13 00:49:59 +0800
commit9573b501a807c22010a9ed50825db146296995eb (patch)
treee9287c0480233d69c32a9f1edae28675f54bdaaa /camel/camel-mime-part.c
parent038f94bb30e7b0a45fbd26e5115a4d04caa1a270 (diff)
downloadgsoc2013-evolution-9573b501a807c22010a9ed50825db146296995eb.tar
gsoc2013-evolution-9573b501a807c22010a9ed50825db146296995eb.tar.gz
gsoc2013-evolution-9573b501a807c22010a9ed50825db146296995eb.tar.bz2
gsoc2013-evolution-9573b501a807c22010a9ed50825db146296995eb.tar.lz
gsoc2013-evolution-9573b501a807c22010a9ed50825db146296995eb.tar.xz
gsoc2013-evolution-9573b501a807c22010a9ed50825db146296995eb.tar.zst
gsoc2013-evolution-9573b501a807c22010a9ed50825db146296995eb.zip
New filter to do CRLF<->LF conversion. (Currently only tested in the
* camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion. (Currently only tested in the LF->CRLF direction.) * camel-mime-part.c (write_to_stream): if content-type is text, and it's QP or B64 encoded, pass through the CRLF filter before the other filter to satisfy the "canonical encoding" rules in the MIME spec. svn path=/trunk/; revision=3529
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r--camel/camel-mime-part.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index c5169741e5..d19cace9c0 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -36,6 +36,7 @@
#include "camel-stream-mem.h"
#include "camel-stream-filter.h"
#include "camel-mime-filter-basic.h"
+#include "camel-mime-filter-crlf.h"
#include "camel-exception.h"
#define d(x)
@@ -528,6 +529,11 @@ write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
}
if (filter) {
filter_stream = camel_stream_filter_new_with_stream(stream);
+ if (!strcasecmp(mp->content_type->type, "text")) {
+ CamelMimeFilter *crlf = camel_mime_filter_crlf_new(CAMEL_MIME_FILTER_CRLF_ENCODE);
+ camel_stream_filter_add(filter_stream, crlf);
+ gtk_object_unref((GtkObject *)crlf);
+ }
camel_stream_filter_add(filter_stream, filter);
gtk_object_unref((GtkObject *)filter);
stream = (CamelStream *)filter_stream;