[PATCH] Do not attept to output part raw if part is not GMimePart.

Austin Clements amdragon at MIT.EDU
Mon Jun 27 15:07:41 PDT 2011


Quoth Jameson Graef Rollins on Jun 27 at  2:44 pm:
> On Mon, 27 Jun 2011 16:43:36 -0400, Austin Clements <amdragon at mit.edu> wrote:
> > Just to clarify my understanding, --format=raw is only intended to
> > work on either the whole message (special-cased in do_show_single) or
> > a leaf MIME part, and in any other case, it will output nothing?  The
> > raw output test cases seem pretty thin.
> 
> Hey, Austin.  The raw part output works for *any* part, be it leaf part,
> multipart, message/rfc822, etc.  I added a bunch of tests for raw part
> output that should cover all of this, although I don't think they've
> been pulled into master yet.

Oh, right, of course.  show_message_part will walk into the parts, so
format_part_content_raw will still be called on the leafs of a
requested multipart.  Though, this approach results in each leaf being
transfer decoded and printed individually, so if you ask for a
multipart, you won't get the "raw" contents of the multipart (unless
it's part 0), so much as you get the concatenated "raw" contents of
each part in the multipart.

Daniel, is this the problem that you're getting at with "opacity"?
That if you ask for a multipart, you should effectively get a slice
out of the original message bytes (since multipart/* parts can't have
non-identity transfer encodings).  Are you also saying that should
extend to transfer encoded leaf parts, too?

> I think there are a lot of open questions about what should be output
> for multipart raw.  We should output _something_, though.  I think we
> can fix all of this up for 0.7, based on the work you've already done,
> after 0.6 is released.

Yes, hopefully.  That's why I'm making sure I understand the issues
here.  ]:--8)


More information about the notmuch mailing list