FA-76372 / Email MIME structure / Member archive
Assign IMAP-style section numbers to body parts: single part root · case 02
A message that is not multipart reports an empty section for its only body part.
Case contract
Returns [section, type] for every non-multipart entity in depth-first order. A single-part message body is section "1". Children of a multipart are numbered 1..n under the parent's number (nested multiparts get their own number). A message/rfc822 part is listed itself; if its encapsulated body is multipart, that body's children are numbered directly under the message part (P.1, P.2...); a single-part encapsulated body is P.1.
Why this case matters
Section numbers are how clients fetch individual parts; off-by-one numbering downloads the wrong attachment.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| single part message | [["", "text/html"]] | [["1", "text/html"]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗