[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-workers] semantics of mhshow -type and -part
From: |
Paul Fox |
Subject: |
[Nmh-workers] semantics of mhshow -type and -part |
Date: |
Sat, 31 Jan 2015 09:02:47 -0500 |
hi -- i'm working on fixing yet another irregularity in the
operation of mhshow_multi_internal() which is keeping it from
displaying some parts of specific unusually constructed messages.
in doing so, i want to be sure that i don't do the wrong thing
with the -part and -type options.
my question is this: should specifying -part and/or -type options
cause nmh to display all matching parts, regardless of
multipart/alternative semantics ?
specifically, given a message like this, it's clear what
"mhshow -type text/html" or "mhshow -type text/plain" should do:
msg part type/subtype size description
27 multipart/mixed 5902
1 multipart/alternative 5213
1.1 text/enriched 33
1.2 text/html 4548
1.3 text/plain 145
2 application/x-zip-compre 57 Dummy Attachment
but what should "mhshow -type text" do, where the subtype is
unspecified? the current git version of nmh shows just part
1.1. (i don't have an older install handy to check 1.6 or 1.5.)
my current (new) code shows all three text parts. my feeling is that
the latter behavior is correct, and that specifying the type should
override the "alternative" property of the multipart. the man page
doesn't say specifically what should happen. further information: if
"multipart/alternative" is changed to either "multipart/related" or
"multipart/parallel", then current git shows all three parts. also,
when using multiple -part options on the above message (i.e. "mhshow
-part 1.1 -part 1.3") then both (or all three) specified parts are shown.
the bug i'm actually fixing is with the following message, generated
by iCloud. using "mhshow -type text/plain" will show only part 2, and
using "mhshow -part 1.2" will show nothing at all (other than the
header). i.e., part 1.2 is undisplayable.
msg part type/subtype size description
7280 multipart/mixed 3645
1 multipart/alternative 3184
1.1 multipart/related 1867
1.1.1 text/html 1629
1.2 text/plain 1002
2 text/plain 127
the problem has to do with the notions of success/failure that
percolate through mhshow_multi_internal(). i've fixed the issue,
i think, but it has led to my initial question. in the case of this
message, again, what should "mhshow -type text" show? should it
ignore the notion of "alternative" and show 1.1.1, 1.2, and 2? or
should it show just one of 1.1.1 or 1.2? likewise, what should
"mhshow -part 1.1.1 -part 1.2" show?
paul
=----------------------
paul fox, address@hidden (arlington, ma, where it's 7.0 degrees)
- [Nmh-workers] semantics of mhshow -type and -part,
Paul Fox <=