]> git.pld-linux.org Git - packages/metamail.git/blame - metamail-suggestedname.patch
- obsoleted by debian patch
[packages/metamail.git] / metamail-suggestedname.patch
CommitLineData
e649f9e4 1--- mm2.7.old/src/metamail/metamail.c Fri Feb 14 09:55:44 2003
2+++ mm2.7/src/metamail/metamail.c Fri Feb 14 10:51:56 2003
3@@ -155,6 +155,7 @@
4
5 char *ContentType = NULL,
6 *ContentEncoding = NULL,
7+ *ContentDisposition = NULL,
8 *MailerName = "unknown",
9 *MailSubject = "Mail message",
10 *MailFrom = "unknown sender",
11@@ -264,6 +265,7 @@
12
13 ContentType = NULL;
14 ContentEncoding = NULL;
15+ ContentDisposition = NULL;
16 MailSubject = "Mail message";
17 MailFrom = "unknown sender";
18 MailSummary = "non-text mail message";
19@@ -521,6 +523,7 @@
20 FILE *fp;
21 int ans = 0, octetstream, ecode=0;
22 suggestedname = FindParam("name");
23+ if (!suggestedname) suggestedname = FindParam("filename");
24 if (!suggestedname) {
25 MkTmpFileName(SugBuf);
26 suggestedname = SugBuf;
27@@ -777,7 +780,7 @@
28 /* strip leading white space */
29 while (*ContentType && isspace((unsigned char) *ContentType)) ++ContentType;
30 StripTrailingSpace(ContentType);
31- ParseContentParameters(ContentType);
32+ ParseContentParameters(0, ContentType);
33 break;
34 case 'd':
35 MightAskBeforeExecuting = 0;
36@@ -1582,6 +1585,7 @@
37 BoundaryCt=0;
38 return -1;
39 }
40+ ContentDisposition = NULL;
41 for (s=mailheaders+oldbytes; *s; ++s) {
42 if (*s == '\n' && (*(s+1) != ' ') && (*(s+1) != '\t')) {
43 if (!ContentType && !lc2strncmp(s, "\ncontent-type:", 14)) {
44@@ -1604,7 +1608,7 @@
45 }
46 }
47 StripTrailingSpace(ContentType);
48- ParseContentParameters(ContentType);
49+ ParseContentParameters(0, ContentType);
50 if (PrintHeads) maybephead(s+1);
51 } else if (!ContentEncoding && !lc2strncmp(s, "\ncontent-transfer-encoding:", 27)) {
52 ContentEncoding = FreshHeaderCopy(s+27);
53@@ -1615,9 +1619,13 @@
54 } else if (!lc2strncmp(s, "\nfrom:", 6)) {
55 if (PrintHeads) maybephead(s+1);
56 MailFrom = FreshHeaderCopy(s+6);
57- } else if (!lc2strncmp(s, "\ncontent-description:", 4)) {
58+ } else if (!lc2strncmp(s, "\ncontent-description:", 21)) {
59 if(PrintHeads) maybephead(s+1);
60 MailSubject = FreshHeaderCopy(s+21);
61+ } else if (!ContentDisposition && !lc2strncmp(s, "\ncontent-disposition:", 21)) {
62+ ContentDisposition = FreshHeaderCopy(s+21);
63+ StripTrailingSpace(ContentDisposition);
64+ ParseContentParameters(CParamsUsed, ContentDisposition);
65 } else {
66 /* Print any with encoded variables */
67 char *dum = s;
68@@ -2579,12 +2587,13 @@
69 }
70
71 void
72-ParseContentParameters(ct)
73+ParseContentParameters(pc, ct)
74+int pc;
75 char *ct;
76 {
77 char *s, *t, *eq;
78
79- CParamsUsed = 0;
80+ CParamsUsed = pc;
81 s = index(ct, ';');
82 if (!s) return;
83 *s++ = 0;
This page took 0.076983 seconds and 4 git commands to generate.