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

Jack Cai updated GERONIMO-4874:
-------------------------------

    Attachment: GERONIMO-4874.patch

I use the nio buffers and charset decoders to do the text scan and replacement 
in a stream-style. The performance is improved in two aspects -

1. Less memory consumption. The output is written out as it comes in. No need 
to hold a big chunk of data in memory.
2. Less charset decoding/encoding overhead. The original filter will encode 
text into byte array and then decode again. The patch will scan text directly.

I tested the new filter with the admin console by clicking through most of the 
pages. Everything looks good.

The patch can be applied to branch 2.1, branch 2.2 and trunk.

> Improve the console filter performance
> --------------------------------------
>
>                 Key: GERONIMO-4874
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4874
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 2.1.4, 2.1.5, 2.2, 3.0
>         Environment: All
>            Reporter: Jack Cai
>            Priority: Minor
>         Attachments: GERONIMO-4874.patch
>
>
> Current console filter for blocking XSRF attack does not scale well as it 
> need to read all the output into a string and then do some text replacement. 
> This will use a lot of memory in extreme cases. See the discussion [1].
> [1] http://www.nabble.com/XSRFHandler-question-td24545409s134.html

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

Reply via email to