geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Cai <>
Subject Re: XSRFHandler question
Date Mon, 20 Jul 2009 06:56:22 GMT
The difficulty I see here is that the output is a byte stream, so watching a
string pattern in this stream is not that easy.

An alternative is that instead of inserting the XSRF.js content before the
"</body>" tag, we may simply append it to the end of the response. This
means the script will be put outside the <html> tag, and thus does not
conform to the HTML spec. However, mainstream browsers such as IE and
FireFox usually tolerate this and can execute this script correctly...


On Sat, Jul 18, 2009 at 3:34 PM, David Jencks <>wrote:

> I happened to get an OOM exception when I tried to look at the web console
> jmx viewer while the testsuite was running, coming from the regular
> expression replace in XSRFHandler.  Looking into this it collects the entire
> output into a byte array and then processes it.  I would think this does not
> scale.
> Is it possible for this code to be rewritten to work with streams so not
> very much output needs to be kept in memory at once?
> thanks
> david jencks

View raw message