Author: remy.maucherat(a)jboss.com
Date: 2009-10-20 09:12:43 -0400 (Tue, 20 Oct 2009)
New Revision: 1212
Modified:
branches/2.1.x/java/org/apache/tomcat/util/buf/C2BConverter.java
branches/2.1.x/webapps/docs/changelog.xml
Log:
- Fix a regression with the replacement fix. Forcing a replacement is a lot more complex,
so rely on the default
behavior of the encoder.
Modified: branches/2.1.x/java/org/apache/tomcat/util/buf/C2BConverter.java
===================================================================
--- branches/2.1.x/java/org/apache/tomcat/util/buf/C2BConverter.java 2009-10-19 22:31:30
UTC (rev 1211)
+++ branches/2.1.x/java/org/apache/tomcat/util/buf/C2BConverter.java 2009-10-20 13:12:43
UTC (rev 1212)
@@ -47,10 +47,8 @@
public C2BConverter(String charset)
throws IOException {
try {
- byte[] newReplacement = { (byte)'?' };
encoder = Charset.forName(charset).newEncoder();
encoder = encoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
- encoder = encoder.replaceWith(newReplacement);
} catch (UnsupportedCharsetException e) {
throw new UnsupportedEncodingException(charset);
}
Modified: branches/2.1.x/webapps/docs/changelog.xml
===================================================================
--- branches/2.1.x/webapps/docs/changelog.xml 2009-10-19 22:31:30 UTC (rev 1211)
+++ branches/2.1.x/webapps/docs/changelog.xml 2009-10-20 13:12:43 UTC (rev 1212)
@@ -22,6 +22,9 @@
<fix>
<bug>46950</bug>: Allow renegotiation to work for client
certificates. (markt)
</fix>
+ <fix>
+ Improve fix for <jboss-jira>JBAS-6442</jboss-jira>, which failed for
some encodings. (jfclere, remm)
+ </fix>
</changelog>
</subsection>
</section>
Show replies by date