Re: Possible bug in handling MIME messsage?
- Let me explain what is happening.
First, the Reader uses \n as the line terminator, so there will not be
multiple \n in one line. Second, the entity boundary is \r\n, i.e.
this is the terminator that MIME adds to the end of the entity. Third,
there is a multi-part boundary that begins with two dashes -> '--'.
So, when the Reader encounters the multipart boundary, it then checks
the last line to see if ends with the \r\n (the entity boundary). If so,
it removes it. (Yes, it should only remove it once.)
It's pretty straight forward. If windows is sending a CRLF as \n\r,
then the last line is \r\r\n. The incorrect code removes everything.
The correct code just removes the \r\n.