summaryrefslogtreecommitdiff
path: root/mail/pine
diff options
context:
space:
mode:
authortv <tv>1998-11-16 16:22:05 +0000
committertv <tv>1998-11-16 16:22:05 +0000
commitd8f78a54a90200fcac92f13a48f7afb3de382c79 (patch)
tree7d6576e119089968e1cfeeac9c6c013f7ce1e770 /mail/pine
parentf039c13e0874bff32d5ed0ba32ee1dab9502f0c6 (diff)
downloadpkgsrc-d8f78a54a90200fcac92f13a48f7afb3de382c79.tar.gz
Try to get the "name=" field from Content-Type: if Content-Disposition:
exists but does not have a "filename=" field. Many broken mailers are now doing this with attachments.
Diffstat (limited to 'mail/pine')
-rw-r--r--mail/pine/patches/patch-ag32
1 files changed, 32 insertions, 0 deletions
diff --git a/mail/pine/patches/patch-ag b/mail/pine/patches/patch-ag
new file mode 100644
index 00000000000..39aa27fdfe3
--- /dev/null
+++ b/mail/pine/patches/patch-ag
@@ -0,0 +1,32 @@
+$NetBSD: patch-ag,v 1.3 1998/11/16 16:22:05 tv Exp $
+
+--- pine/mailpart.c.orig Mon Nov 16 10:43:42 1998
++++ pine/mailpart.c Mon Nov 16 10:55:26 1998
+@@ -1314,7 +1314,6 @@
+
+ int r, is_text, over = 0, we_cancel = 0;
+ long len, orig_size;
+- PARAMETER *param;
+ gf_io_t pc;
+ STORE_S *store;
+ static ESCKEY_S att_save_opts[] = {
+@@ -1328,16 +1327,11 @@
+ /*------- Figure out suggested file name ----*/
+ filename[0] = full_filename[0] = '\0';
+ att_name = "filename";
+- if(a->body->disposition.type){
+- param = a->body->disposition.parameter;
+- }
+- else{
+- param = a->body->parameter;
+- att_name += 4;
+- }
+
+ /* warning: overload "err" use */
+- if(err = rfc2231_get_param(param, att_name, NULL, NULL)){
++ if((a->body->disposition.type &&
++ (err = rfc2231_get_param(a->body->disposition.parameter, att_name, NULL, NULL))) ||
++ (err = rfc2231_get_param(a->body->parameter, att_name + 4, NULL, NULL))){
+ strncpy(filename, err, MAXPATH);
+ filename[MAXPATH] = '\0';
+ fs_give((void **) &err);