[Email-SIG] Double boundaries
Barry Warsaw
barry at python.org
Tue May 11 17:25:43 EDT 2004
One of Anthony's torture tests includes a double boundary, e.g.
...
Content-type: multipart/x-foo; boundary=BBB
...
--BBB
--BBB
...
--BBB--
Now, his expected output would ignore the second of the double
boundaries. The current FeedParser injects basically an empty
text/plain Message in there.
The best justification I could find for Anthony's expected output is in
the RFC 2046 BNF (see Appendix A):
body-part := <"message" as defined in RFC 822, with all
header fields optional, not starting with the
specified dash-boundary, and with the
delimiter not occurring anywhere in the
body part. Note that the semantics of a
part differ from the semantics of a message,
as described in the text.>
dash-boundary := "--" boundary
; boundary taken from the value of
; boundary parameter of the
; Content-Type field.
So because the dash-boundary is the first line, this can't be a body
part. Google didn't turn up any further discussion about what the
intent of the RFC is in cases like this. If anybody is aware of further
references on this subject, please follow up.
Barring further information, I'll try to make the FeedParser ignore
subsequent double boundaries.
-Barry
More information about the Email-SIG
mailing list