ietf-822
[Top] [All Lists]

Re: MIME boundary question

1995-02-09 11:56:27
On Feb 9, 10:02am, Steve Dorner wrote:
multipart/mixed; boundary="outer"

--outer
multipart/mixed; boundary="outer-inner"

--outer-inner

stuff

--outer-inner--
--outer--

I have a vendor claiming that this is illegal because the "outer"
appears in the boundary "outer-inner", and thus violates the need
for the boundaries to be unique.

I think most implementors interpret this as legal, but a close reading
of RFC-1521 seems to permit an ambiguous interpretation.  On page 28:

    The encapsulation boundary MUST NOT appear inside any of the
    encapsulated parts.

and on page 29:

    The encapsulation boundary is defined as a line consisting
    entirely of two hyphen characters ("-", decimal code 45) followed
    by the boundary parameter value from the Content-Type header
    field.

Of particular note is that the definition of "the encapsulation
boundary" does not include the terminating CR-LF.

On page 30,

    The boundary must be followed immediately either by another CRLF
    and the header fields for the next part, or by two CRLFs, in which
    case there are no header fields for the next part [...]

but in the case that a boundary is not followed by a CR-LF, it's not
specified whether the correct interpretation is a syntax error in the
message or a possibly-different boundary.

As a practical matter, following the "be liberal in what you
recognize, be rigorous in what you generate" dictum, I would strongly
encourage all implementors to handle the case described above.  My
code does.

-- 
Bob Glickstein
Z-Code Software Corp.
101 Rowland Way  Suite 300
Novato, CA  94945
(415) 898-8649    Fax: (415) 898-8299


<Prev in Thread] Current Thread [Next in Thread>