aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-mime-utils.c20
2 files changed, 24 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 8cc5d03f3a..dc33a42898 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2000-10-27 Dan Winship <danw@helixcode.com>
+
+ * camel-mime-utils.c (header_param_list_format_append): Work
+ around Outlook brokenness in iMIP parsing by only quoting
+ Content-type parameters when the quoting is mandatory.
+
2000-10-27 <jpr@helixcode.com>
* providers/pop3/Makefile.am: Tidy up build
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 22b6dfcff0..76aa672cae 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -2202,14 +2202,30 @@ static void
header_param_list_format_append(GString *out, struct _header_param *p)
{
int len = out->len;
+ char *ch;
+
while (p) {
int here = out->len;
if (len+strlen(p->name)+strlen(p->value)>60) {
out = g_string_append(out, "\n\t");
len = 0;
}
- /* FIXME: format the value properly */
- g_string_sprintfa(out, " ; %s=\"%s\"", p->name, p->value);
+
+ g_string_sprintfa(out, " ; %s=", p->name);
+
+ /* Outlook will not recognize an iTIP attachment with
+ * eg 'method="request"'. It must be 'method=request'.
+ * So only quote if we need to. (Sigh)
+ */
+ for (ch = p->value; *ch; ch++) {
+ if (is_tspecial(*ch))
+ break;
+ }
+ if (!*ch)
+ g_string_append(out, p->value);
+ else
+ quote_word(out, TRUE, p->value, strlen(p->value));
+
len += (out->len - here);
p = p->next;
}