FA-76492 / Email MIME structure / Member archive
Resolve cid: references inside multipart/related: unused excludes root · case 02
The root document is reported as an unreferenced related part.
Case contract
related has params (optional start, with angle brackets) and parts with optional cid values such as " <img@x> ". Content ids are compared after trimming spaces and angle brackets. The root is the part whose id equals the start id, else the first part. Each reference is a URL; the "cid:" scheme is case-insensitive and the rest is percent-decoded. A reference resolves to the first non-root part with an equal id, else None. Result {root, resolved [[ref, index]...], unused: non-root indexes nobody referenced}.
Why this case matters
Inline images and style sheets in HTML mail are located through Content-ID references.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| padded content id | {"resolved": [["cid:pic2@x", 1]], "root": 0, "unused": [0]} | {"resolved": [["cid:pic2@x", 1]], "root": 0, "unused": []} | 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 ↗