From ba7ee8a32386d1e3649996b8b5f046606c43bb45 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 22 Nov 2014 19:00:32 -0600 Subject: [PATCH] Use Nmh-Attach for attach header field name, and accept Attach. --- h/mime.h | 4 +++- test/mhbuild/test-attach | 12 ++++++------ uip/mhbuildsbr.c | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/h/mime.h b/h/mime.h index 92d6462a..9fcaf5d3 100644 --- a/h/mime.h +++ b/h/mime.h @@ -12,7 +12,9 @@ #define DESCR_FIELD "Content-Description" #define DISPO_FIELD "Content-Disposition" #define MD5_FIELD "Content-MD5" -#define ATTACH_FIELD "Attach" +#define PSEUDOHEADER_PREFIX "Nmh-" +#define ATTACH_FIELD PSEUDOHEADER_PREFIX "Attach" +#define ATTACH_FIELD_ALT "Attach" #define isatom(c) (isascii((unsigned char) c) \ && !isspace ((unsigned char) c) \ diff --git a/test/mhbuild/test-attach b/test/mhbuild/test-attach index 11e05512..3e20158a 100755 --- a/test/mhbuild/test-attach +++ b/test/mhbuild/test-attach @@ -1,7 +1,7 @@ #!/bin/sh ###################################################### # -# Test the use of the Attach: header +# Test the use of the Nmh-Attach: header # ###################################################### @@ -29,7 +29,7 @@ cat > "$draft" < cc: Fcc: +outbox -Attach: ${srcdir}/test/mhbuild/tiny.jpg +Nmh-Attach: ${srcdir}/test/mhbuild/tiny.jpg ------ EOF @@ -59,8 +59,8 @@ cat > "$draft" < cc: Fcc: +outbox -Attach: ${srcdir}/test/mhbuild/tiny.jpg -Attach: ${srcdir}/test/mhbuild/nulls +Nmh-Attach: ${srcdir}/test/mhbuild/tiny.jpg +Nmh-Attach: ${srcdir}/test/mhbuild/nulls ------ This is a test EOF @@ -108,7 +108,7 @@ cat > "$draft" < cc: Fcc: +outbox -Attach: +Nmh-Attach: ------ This is a test of an empty attach header. EOF @@ -243,7 +243,7 @@ check "$draft" "$expected" # # Two parts, one attachment; make sure mixing of multiparts at different -# levels works +# levels works. This also tests Attach: instead of Nmh-Attach:. # cat > "$draft" <