Author: jfrederic.clere(a)jboss.com
Date: 2008-04-28 06:34:15 -0400 (Mon, 28 Apr 2008)
New Revision: 594
Modified:
branches/JBOSSWEB_2_0_0_GA_CP05_JBAPP729_JBAPP746/src/share/classes/org/apache/tomcat/util/http/Parameters.java
Log:
JBAPP729: r568. Encoding problems with login (form based) pages.
Modified:
branches/JBOSSWEB_2_0_0_GA_CP05_JBAPP729_JBAPP746/src/share/classes/org/apache/tomcat/util/http/Parameters.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP05_JBAPP729_JBAPP746/src/share/classes/org/apache/tomcat/util/http/Parameters.java 2008-04-28
10:29:09 UTC (rev 593)
+++
branches/JBOSSWEB_2_0_0_GA_CP05_JBAPP729_JBAPP746/src/share/classes/org/apache/tomcat/util/http/Parameters.java 2008-04-28
10:34:15 UTC (rev 594)
@@ -503,17 +503,12 @@
public void processParameters( MessageBytes data, String encoding ) {
if( data==null || data.isNull() || data.getLength() <= 0 ) return;
- if( data.getType() == MessageBytes.T_BYTES ) {
- ByteChunk bc=data.getByteChunk();
- processParameters( bc.getBytes(), bc.getOffset(),
- bc.getLength(), encoding);
- } else {
- if (data.getType()!= MessageBytes.T_CHARS )
- data.toChars();
- CharChunk cc=data.getCharChunk();
- processParameters( cc.getChars(), cc.getOffset(),
- cc.getLength());
+ if (data.getType() != MessageBytes.T_BYTES) {
+ data.toBytes();
}
+ ByteChunk bc=data.getByteChunk();
+ processParameters( bc.getBytes(), bc.getOffset(),
+ bc.getLength(), encoding);
}
/** Debug purpose
Show replies by date