mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DIRMINA-530) Compression filter - trivial bug fix and fix for use with SSL
Date Wed, 20 Feb 2008 03:16:44 GMT

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

Trustin Lee updated DIRMINA-530:
--------------------------------

    Affects Version/s:     (was: 2.0.0-M2)
                       2.0.0-M1
                       1.0.9
                       1.1.6
        Fix Version/s: 1.1.7
                       1.0.10
             Assignee: Trustin Lee

This issue also affects 1.x.  Will be fixed in the next milestone.

> Compression filter - trivial bug fix and fix for use with SSL
> -------------------------------------------------------------
>
>                 Key: DIRMINA-530
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-530
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 1.0.9, 1.1.6, 2.0.0-M1
>         Environment: N/A?  But Mac OS X Leopard (Java 1.5) does display the issue.
>            Reporter: Justin SB
>            Assignee: Trustin Lee
>             Fix For: 1.0.10, 1.1.7, 2.0.0-M2
>
>         Attachments: patch-compression.diff
>
>
> The compression filter has a simple bug, where it uses limit() instead of remaining().
Where position != 0, this causes reads to exceed available data:
> -        byte[] inBytes = new byte[inBuffer.limit()];
> +        byte[] inBytes = new byte[inBuffer.remaining()];
>          inBuffer.get(inBytes).flip();
>  
> Also, when the compression filter is chained with the SSL filter, and SSL status notification
is enabled, the SSL filter sends state messages through the chain.  These are not IoBuffers,
but the compression filter treats them as if they were:
> +    public void messageReceived(NextFilter nextFilter, IoSession session, Object message)
throws Exception {
> +    	// Ignore control messages e.g. from SSL filter
> +    	boolean compress = compressInbound && (message instanceof IoBuffer);
> +    	
> +        if (!compress)  {
> Patch file will be attached...

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


Mime
View raw message