Pull up refillReadBuffer()
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 23 Aug 2011 14:50:27 +0000 (14:50 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 23 Aug 2011 14:50:27 +0000 (14:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1160721 13f79535-47bb-0310-9956-ffa450edef68

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

index 8f98a88..6adf576 100644 (file)
@@ -544,7 +544,6 @@ public abstract class AbstractAjpProcessor<S> extends AbstractProcessor<S> {
 
     // Methods used by SocketInputBuffer
     protected abstract boolean receive() throws IOException;
-    protected abstract boolean refillReadBuffer() throws IOException;
 
 
     @Override
@@ -555,6 +554,34 @@ public abstract class AbstractAjpProcessor<S> extends AbstractProcessor<S> {
 
 
     /**
+     * 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 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.
      */
     protected void prepareRequest() {
index 7db138a..6ccbeab 100644 (file)
@@ -377,35 +377,6 @@ public class AjpAprProcessor extends AbstractAjpProcessor<Long> {
         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.
index de98eb6..f6500a1 100644 (file)
@@ -383,34 +383,6 @@ public class AjpNioProcessor extends AbstractAjpProcessor<NioChannel> {
         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.
index 3c69b83..543f89f 100644 (file)
@@ -341,35 +341,6 @@ public class AjpProcessor extends AbstractAjpProcessor<Socket> {
     }
 
     /**
-     * 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