ietf-822
[Top] [All Lists]

Re: MIME boundary question

1995-02-09 23:20:22
NOTE TO IMPLEMENTORS: Boundary string comparisons must take into
account the full contents of the candidate line containing a
possible boundary string.  Specifically, the entire string following
the CRLF and two dashes up to either the final two dashes or the
final CRLF must be compared with the boundary parameter. An exact
match is required; a substring match is not sufficient.

NO, NO, NO, NO, NO!

Implementations are required to ignore trailing whitespace on boundary
lines.  If implementations can't do a match on the "<CRLF>--outer",
then they have to be able to do an *arbitrary* amount of lookahead, to
make sure there isn't a non-whitespace octet between the 35 megabytes
of spaces/tabs and the following CRLF.

This is silly.  Some MTAs pad lines out to 80 characters, but nothing
adds an arbitrary amount of space padding.  Therefore, you don't need
to do an arbitrary amount of lookahead in practice.

If you have to have a hard number for the maximum amount of lookahead,
make it the SMTP limit of 1000 characters.  I think it's safe to
assume that no message has that much padding added, and any message
with longer lines than that probably wasn't subjected to line padding
anyway (because it was never run through a system that used
fixed-length records).

Also:

a) Even though MIME readers have to ignore trailing white space
characters, composers MUST NOT add trailing white space characters.

b) Multipart/* boundary= parameters MUST NOT contain trailing white
space, even if the paramter value is enclosed in double quotes.

Keith

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