diff options
author | Michael Zucci <zucchi@src.gnome.org> | 2000-12-11 19:40:15 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-12-11 19:40:15 +0800 |
commit | 1c95a1e9859e02781267975b821b9f62467b79d0 (patch) | |
tree | 9273fed0890c9a444ea9c7ff7044cff91a2a4c6b /camel/camel-mime-part.c | |
parent | c08e99018cacc660a1995507b8d505f45f41cc95 (diff) | |
download | gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.gz gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.bz2 gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.lz gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.xz gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.zst gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.zip |
Remove use of linewrap filter. Headers are now wrapped. encode_8bit
* providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
linewrap filter. Headers are now wrapped. encode_8bit already
enforces a 998 octet line limit.
(smtp_data): Also fixed a memleak, we always have to unref our own
copy of the filters. We also dont need to remove them manually,
so dont bother. The type's an int too ...
* camel-internet-address.c (internet_unformat): When scanning past
quotes, remove them also.
(camel_internet_address_format_address): If the name contains "'s,
or ','s then strip and quotes and wrap the whole lot in one set of
quotes.
* Makefile.am (noinst_HEADERS): We dont want to install
camel-charset-map-private.h, ever. There are probably other
similar files ..?
* camel-mime-part.c (write_to_stream): Fold header lines
appropriately as we're writing them out.
* camel-mime-utils.c (header_fold): Add a new argument, headerlen,
tells it how long the associated header token is.
(header_fold): Also,k check to see if we need to fold first, using
a better algorithm, and also accept already-folded lines, and
re-process accordingly.
(rfc2047_decode_word): Add a little buffer space to iconv output
for shifting overheads?
(rfc2047_decode_word): finish the iconv with a null call, to flush
shift state, etc.
(rfc2047_encode_word): Attempt to break up long words into
appropriately sized, independent, chunks. See rfc2047, section 2.
(header_decode_mailbox): Dont add in extra spaces into the output
if we are decoding adjacent encoded words. We can only guess this
case, as some broken mailers put encoded words inside quoted
words.
(header_encode_phrase): Dont merge words if they are going to end
up too long. Also change back ot only merge consecutive words of
the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or
'iam an. idiot' -> iam "an." idiot
svn path=/trunk/; revision=6902
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r-- | camel/camel-mime-part.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 86ac9c0b13..e553e60257 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -494,13 +494,17 @@ write_to_stream(CamelDataWrapper *data_wrapper, CamelStream *stream) if (mp->headers) { struct _header_raw *h = mp->headers; + char *val; while (h) { - if (h->value == NULL){ + val = h->value; + if (val == NULL) { g_warning("h->value is NULL here for %s", h->name); count = 0; } else { - count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(h->value[0]) ? ":" : ": ", h->value); + val = header_fold(val, strlen(h->name)); + count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(val[0]) ? ":" : ": ", val); + g_free(val); } if (count == -1) return -1; |