tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51400] Use of "new String(byte[] b, String enc)" hits Sun JVM bottleneck
Date Thu, 23 Jun 2011 20:24:24 GMT

--- Comment #13 from Konstantin Prei├čer <> 2011-06-23 20:24:24 UTC ---
Created attachment 27202
Patch to prepopulate available charsets

I made a example of a patch which uses a HashMap to prepopulate all available
Charsets in the current JVM when the class is initialized (I'm sorry if I did
something wrong, I didn't made a patch before).

The patch adds all available charsets and their aliases (by converting them to
lower-case) to the Map. The case normalization solves the DoS danger when a
Client makes requests with lot of different case permutations of the same
charset name, and it allows detection of missing charsets without calling

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message