Work around Outlook brokenness in iMIP parsing by only quoting
* 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. svn path=/trunk/; revision=6237
This commit is contained in:
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user