From: fhanik Date: Fri, 24 Aug 2007 19:32:34 +0000 (+0000) Subject: Added support for when the buffers are sized very similarly X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4dd5b205dbb26b253bb90ec2dd1b654dedde7ff3;p=tomcat7.0 Added support for when the buffers are sized very similarly git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@569485 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java b/java/org/apache/coyote/http11/Http11NioProcessor.java index 3b8496e49..b2e89082b 100644 --- a/java/org/apache/coyote/http11/Http11NioProcessor.java +++ b/java/org/apache/coyote/http11/Http11NioProcessor.java @@ -841,6 +841,9 @@ public class Http11NioProcessor implements ActionHook { socket.getIOChannel().socket().setSoTimeout((int)timeout); } } catch (IOException e) { + if (log.isDebugEnabled()) { + log.debug(sm.getString("http11processor.header.parse"), e); + } error = true; break; } catch (Throwable t) { diff --git a/java/org/apache/tomcat/util/net/SecureNioChannel.java b/java/org/apache/tomcat/util/net/SecureNioChannel.java index 3fbcc6994..79f6e175d 100644 --- a/java/org/apache/tomcat/util/net/SecureNioChannel.java +++ b/java/org/apache/tomcat/util/net/SecureNioChannel.java @@ -370,6 +370,10 @@ public class SecureNioChannel extends NioChannel { if (unwrap.getHandshakeStatus() == HandshakeStatus.NEED_TASK) tasks(); //if we need more network data, then bail out for now. if ( unwrap.getStatus() == Status.BUFFER_UNDERFLOW ) break; + }else if ( unwrap.getStatus()==Status.BUFFER_OVERFLOW && read>0 ) { + //buffer overflow can happen, if we have read data, then + //empty out the dst buffer before we do another read + break; }else { //here we should trap BUFFER_OVERFLOW and call expand on the buffer //for now, throw an exception, as we initialized the buffers