Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 135D57A41 for ; Tue, 23 Aug 2011 15:50:27 +0000 (UTC) Received: (qmail 6840 invoked by uid 500); 23 Aug 2011 15:50:26 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 6778 invoked by uid 500); 23 Aug 2011 15:50:25 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 6769 invoked by uid 99); 23 Aug 2011 15:50:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2011 15:50:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2011 15:50:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2427223889D5 for ; Tue, 23 Aug 2011 15:50:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1160752 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/ajp/AbstractAjpProcessor.java java/org/apache/coyote/ajp/AjpAprProcessor.java java/org/apache/coyote/ajp/AjpNioProcessor.java java/org/apache/coyote/ajp/AjpProcessor.java Date: Tue, 23 Aug 2011 15:50:02 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110823155003.2427223889D5@eris.apache.org> Author: markt Date: Tue Aug 23 15:50:02 2011 New Revision: 1160752 URL: http://svn.apache.org/viewvc?rev=1160752&view=rev Log: Pull up refillReadBuffer() Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 23 15:50:02 2011 @@ -1 +1 @@ -/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1160347,1160592,1160611,1160619,1160626,1160639,1160652 +/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1160752&r1=1160751&r2=1160752&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Tue Aug 23 15:50:02 2011 @@ -544,7 +544,6 @@ public abstract class AbstractAjpProcess // Methods used by SocketInputBuffer protected abstract boolean receive() throws IOException; - protected abstract boolean refillReadBuffer() throws IOException; @Override @@ -555,16 +554,33 @@ public abstract class AbstractAjpProcess /** - * Callback to write data from the buffer. + * Get more request body data from the web server and store it in the + * internal buffer. + * + * @return true if there is more data, false if not. */ - protected void flush(boolean explicit) throws IOException { - if (explicit && !finished) { - // Send the flush message - output(flushMessageArray, 0, flushMessageArray.length); + protected boolean refillReadBuffer() throws IOException { + // If the server returns an empty packet, assume that that end of + // the stream has been reached (yuck -- fix protocol??). + // FORM support + if (replay) { + endOfStream = true; // we've read everything there is + } + if (endOfStream) { + return false; } + + // Request more data immediately + output(getBodyMessageArray, 0, getBodyMessageArray.length); + + boolean moreData = receive(); + if( !moreData ) { + endOfStream = true; + } + return moreData; } - + /** * After reading the request headers, we have to setup the request filters. */ @@ -939,6 +955,17 @@ public abstract class AbstractAjpProcess /** + * Callback to write data from the buffer. + */ + protected void flush(boolean explicit) throws IOException { + if (explicit && !finished) { + // Send the flush message + output(flushMessageArray, 0, flushMessageArray.length); + } + } + + + /** * Finish AJP response. */ protected void finish() throws IOException { Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1160752&r1=1160751&r2=1160752&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Tue Aug 23 15:50:02 2011 @@ -377,35 +377,6 @@ public class AjpAprProcessor extends Abs return true; } - /** - * Get more request body data from the web server and store it in the - * internal buffer. - * - * @return true if there is more data, false if not. - */ - @Override - protected boolean refillReadBuffer() throws IOException { - // If the server returns an empty packet, assume that that end of - // the stream has been reached (yuck -- fix protocol??). - // FORM support - if (replay) { - endOfStream = true; // we've read everything there is - } - if (endOfStream) { - return false; - } - - // Request more data immediately - Socket.send(socket.getSocket().longValue(), getBodyMessageArray, 0, - getBodyMessageArray.length); - - boolean moreData = receive(); - if( !moreData ) { - endOfStream = true; - } - return moreData; - } - /** * Read an AJP message. Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1160752&r1=1160751&r2=1160752&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Tue Aug 23 15:50:02 2011 @@ -383,34 +383,6 @@ public class AjpNioProcessor extends Abs return true; } - /** - * Get more request body data from the web server and store it in the - * internal buffer. - * - * @return true if there is more data, false if not. - */ - @Override - protected boolean refillReadBuffer() throws IOException { - // If the server returns an empty packet, assume that that end of - // the stream has been reached (yuck -- fix protocol??). - // FORM support - if (replay) { - endOfStream = true; // we've read everything there is - } - if (endOfStream) { - return false; - } - - // Request more data immediately - output(getBodyMessageArray, 0, getBodyMessageArray.length); - - boolean moreData = receive(); - if( !moreData ) { - endOfStream = true; - } - return moreData; - } - /** * Read an AJP message. Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1160752&r1=1160751&r2=1160752&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Tue Aug 23 15:50:02 2011 @@ -341,35 +341,6 @@ public class AjpProcessor extends Abstra } /** - * Get more request body data from the web server and store it in the - * internal buffer. - * - * @return true if there is more data, false if not. - */ - @Override - protected boolean refillReadBuffer() throws IOException { - // If the server returns an empty packet, assume that that end of - // the stream has been reached (yuck -- fix protocol??). - // FORM support - if (replay) { - endOfStream = true; // we've read everything there is - } - if (endOfStream) { - return false; - } - - // Request more data immediately - output.write(getBodyMessageArray); - - boolean moreData = receive(); - if( !moreData ) { - endOfStream = true; - } - return moreData; - } - - - /** * Read an AJP message. * * @return true if the message has been read, false if the short read --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org