tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
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
https://issues.apache.org/bugzilla/show_bug.cgi?id=51400

--- Comment #13 from Konstantin Prei├čer <preissa@web.de> 2011-06-23 20:24:24 UTC ---
Created attachment 27202
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=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
Charset.forName().

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message