From 8a1006b457cdc27c40b9c928dc9fb5086444f04b Mon Sep 17 00:00:00 2001 From: David Levine Date: Tue, 24 Oct 2006 14:31:40 +0000 Subject: [PATCH] * uip/sendsbr.c: with attachformat values of 1 or 2, add name= portion to Content-Type header. This makes them consistent with attachformat value 0. And it allows mhstore to use that (file)name when extracting attachments. --- ChangeLog | 7 +++++++ uip/sendsbr.c | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0839ee..9e33cb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-10-24 David Levine + + * uip/sendsbr.c: with attachformat values of 1 or 2, add + name= portion to Content-Type header. This makes them + consistent with attachformat value 0. And it allows mhstore + to use that (file)name when extracting attachments. + 2006-08-26 Josh Bressers * configure.in: If we're not using dotlocking, there is no need to set diff --git a/uip/sendsbr.c b/uip/sendsbr.c index f8384f7..2d9a7d4 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -498,8 +498,9 @@ make_mime_composition_file_entry(char *file_name, int attachformat) } else { /* Suppress Content-Id, insert simple Content-Disposition. */ (void) fprintf (composition_file, - "#%s <>{attachment}", - content_type); + "#%s; name=\"%s\" <>{attachment}", + content_type, + ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1); } break; @@ -514,8 +515,9 @@ make_mime_composition_file_entry(char *file_name, int attachformat) /* Suppress Content-Id, insert Content-Disposition with modification date. */ (void) fprintf (composition_file, - "#%s <>{attachment; modification-date=\"%s\"}", + "#%s; name=\"%s\" <>{attachment; modification-date=\"%s\"}", content_type, + ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1, dtime (&st.st_mtime, 0)); } -- 1.7.10.4