Uploaded image for project: 'James Mime4j'
  1. James Mime4j
  2. MIME4J-67

Base64Encoder fails to encode streams longer than its buffer size (1024)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.4
    • 0.6
    • None
    • None

    Description

      When encoding streams longer than 1024 bytes the encoder simply concatenate the base64 version of each 1024 chunk and this is wrong. Base64 streams are only concatenable when the original text length was a multiple of 3. Supporting buffer chunks encoding require keeping the last 1-2 bytes in a buffer and eventually convert them to base64 ending sequences only when the stream is closed.

      Attachments

        Issue Links

          Activity

            People

              wmax Markus Wiederkehr
              bago Stefano Bagnara
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: