Loading ...
Sorry, an error occurred while loading the content.

Re: Possible bug in handling MIME messsage?

Expand Messages
  • jpeyser
    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
    Message 1 of 11 , Oct 26, 2004
    • 0 Attachment
      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.

      Jonathan
    Your message has been successfully submitted and would be delivered to recipients shortly.