Author: remy.maucherat(a)jboss.com
Date: 2007-08-24 08:00:13 -0400 (Fri, 24 Aug 2007)
New Revision: 239
Modified:
trunk/java/org/apache/catalina/connector/Connector.java
trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
Log:
- Fix bad connector classname.
- B2C fix (which may occur when a char in incompletely read).
Modified: trunk/java/org/apache/catalina/connector/Connector.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Connector.java 2007-08-23 23:22:37 UTC (rev
238)
+++ trunk/java/org/apache/catalina/connector/Connector.java 2007-08-24 12:00:13 UTC (rev
239)
@@ -610,7 +610,7 @@
|| "org.apache.coyote.http11.Http11AprProtocol".equals
(getProtocolHandlerClassName())) {
return "HTTP/1.1";
- } else if ("org.apache.jk.server.JkCoyoteHandler".equals
+ } else if ("org.apache.coyote.ajp.AjpProtocol".equals
(getProtocolHandlerClassName())
|| "org.apache.coyote.ajp.AjpAprProtocol".equals
(getProtocolHandlerClassName())) {
Modified: trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/B2CConverter.java 2007-08-23 23:22:37 UTC (rev
238)
+++ trunk/java/org/apache/tomcat/util/buf/B2CConverter.java 2007-08-24 12:00:13 UTC (rev
239)
@@ -82,7 +82,7 @@
{
try {
// read from the reader
- while( true ) { // conv.ready() ) {
+ while( iis.available()>0 ) { // conv.ready() ) {
int cnt=conv.read( result, 0, BUFFER_SIZE );
if( cnt <= 0 ) {
// End of stream ! - we may be in a bad state
@@ -255,6 +255,9 @@
return (pos < end ) ? (buf[pos++] & 0xff) : -1;
}
+ public int available() throws IOException {
+ return end-pos;
+ }
// -------------------- Internal methods --------------------
void setBuffer( byte b[], int p, int l ) {
Show replies by date