You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Stefano Bagnara (JIRA)" <se...@james.apache.org> on 2008/07/30 13:13:31 UTC

[jira] Updated: (MIME4J-67) Base64Encoder fails to encode streams longer than its buffer size (1024)

     [ https://issues.apache.org/jira/browse/MIME4J-67?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Bagnara updated MIME4J-67:
----------------------------------

         Priority: Minor  (was: Major)
    Fix Version/s:     (was: 0.4)
                   0.5

Moving this to 0.5 and set priority to minor because we applied MIME4J-65 patch and the bug is not hitted by the current library.

> Base64Encoder fails to encode streams longer than its buffer size (1024)
> ------------------------------------------------------------------------
>
>                 Key: MIME4J-67
>                 URL: https://issues.apache.org/jira/browse/MIME4J-67
>             Project: Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.4
>            Reporter: Stefano Bagnara
>            Priority: Minor
>             Fix For: 0.5
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [jira] Updated: (MIME4J-67) Base64Encoder fails to encode streams longer than its buffer size (1024)

Posted by Stefano Bagnara <ap...@bago.org>.
Robert, I moved MIME4J-66 and MIME4J-67 to 0.5 and marked as minor as I 
applied my patch to MIME4J-65.

Please update them according to your willingness to fix it for a future 
release or not (and in this last case maybe we should remove the buggy 
code, attaching it to JIRA for historical reasons).

Does this work for you?

Stefano

Stefano Bagnara (JIRA) ha scritto:
>      [ https://issues.apache.org/jira/browse/MIME4J-67?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Stefano Bagnara updated MIME4J-67:
> ----------------------------------
> 
>          Priority: Minor  (was: Major)
>     Fix Version/s:     (was: 0.4)
>                    0.5
> 
> Moving this to 0.5 and set priority to minor because we applied MIME4J-65 patch and the bug is not hitted by the current library.
> 
>> Base64Encoder fails to encode streams longer than its buffer size (1024)
>> ------------------------------------------------------------------------
>>
>>                 Key: MIME4J-67
>>                 URL: https://issues.apache.org/jira/browse/MIME4J-67
>>             Project: Mime4j
>>          Issue Type: Bug
>>    Affects Versions: 0.4
>>            Reporter: Stefano Bagnara
>>            Priority: Minor
>>             Fix For: 0.5
>>
>>
>> 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.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org