tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1160619 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProcessor.java AjpNioProcessor.java AjpProcessor.java
Date Tue, 23 Aug 2011 11:00:02 GMT
Author: markt
Date: Tue Aug 23 11:00:02 2011
New Revision: 1160619

URL: http://svn.apache.org/viewvc?rev=1160619&view=rev
Log:
Rename since this message is used for response headers and response body

Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1160619&r1=1160618&r2=1160619&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Tue Aug 23 11:00:02
2011
@@ -146,9 +146,9 @@ public abstract class AbstractAjpProcess
 
 
     /**
-     * Message used for response header composition.
+     * Message used for response composition.
      */
-    protected AjpMessage responseHeaderMessage = null;
+    protected AjpMessage responseMessage = null;
 
 
     /**
@@ -234,7 +234,7 @@ public abstract class AbstractAjpProcess
         request.setInputBuffer(new SocketInputBuffer());
 
         requestHeaderMessage = new AjpMessage(packetSize);
-        responseHeaderMessage = new AjpMessage(packetSize);
+        responseMessage = new AjpMessage(packetSize);
         bodyMessage = new AjpMessage(packetSize);
 
         // Set the getBody message buffer
@@ -865,11 +865,11 @@ public abstract class AbstractAjpProcess
 
         response.setCommitted(true);
 
-        responseHeaderMessage.reset();
-        responseHeaderMessage.appendByte(Constants.JK_AJP13_SEND_HEADERS);
+        responseMessage.reset();
+        responseMessage.appendByte(Constants.JK_AJP13_SEND_HEADERS);
 
         // HTTP header contents
-        responseHeaderMessage.appendInt(response.getStatus());
+        responseMessage.appendInt(response.getStatus());
         String message = null;
         if (org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER &&
                 HttpMessages.isSafeInHttpHeader(response.getMessage())) {
@@ -883,7 +883,7 @@ public abstract class AbstractAjpProcess
             message = Integer.toString(response.getStatus());
         }
         tmpMB.setString(message);
-        responseHeaderMessage.appendBytes(tmpMB);
+        responseMessage.appendBytes(tmpMB);
 
         // Special headers
         MimeHeaders headers = response.getMimeHeaders();
@@ -902,24 +902,24 @@ public abstract class AbstractAjpProcess
 
         // Other headers
         int numHeaders = headers.size();
-        responseHeaderMessage.appendInt(numHeaders);
+        responseMessage.appendInt(numHeaders);
         for (int i = 0; i < numHeaders; i++) {
             MessageBytes hN = headers.getName(i);
             int hC = Constants.getResponseAjpIndex(hN.toString());
             if (hC > 0) {
-                responseHeaderMessage.appendInt(hC);
+                responseMessage.appendInt(hC);
             }
             else {
-                responseHeaderMessage.appendBytes(hN);
+                responseMessage.appendBytes(hN);
             }
             MessageBytes hV=headers.getValue(i);
-            responseHeaderMessage.appendBytes(hV);
+            responseMessage.appendBytes(hV);
         }
 
         // Write to buffer
-        responseHeaderMessage.end();
-        output(responseHeaderMessage.getBuffer(), 0,
-                responseHeaderMessage.getLen());
+        responseMessage.end();
+        output(responseMessage.getBuffer(), 0,
+                responseMessage.getLen());
     }
 
 

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1160619&r1=1160618&r2=1160619&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Tue Aug 23 11:00:02 2011
@@ -538,11 +538,11 @@ public class AjpNioProcessor extends Abs
                     thisTime = chunkSize;
                 }
                 len -= thisTime;
-                responseHeaderMessage.reset();
-                responseHeaderMessage.appendByte(Constants.JK_AJP13_SEND_BODY_CHUNK);
-                responseHeaderMessage.appendBytes(chunk.getBytes(), chunk.getOffset() + off,
thisTime);
-                responseHeaderMessage.end();
-                output(responseHeaderMessage.getBuffer(), 0, responseHeaderMessage.getLen());
+                responseMessage.reset();
+                responseMessage.appendByte(Constants.JK_AJP13_SEND_BODY_CHUNK);
+                responseMessage.appendBytes(chunk.getBytes(), chunk.getOffset() + off, thisTime);
+                responseMessage.end();
+                output(responseMessage.getBuffer(), 0, responseMessage.getLen());
 
                 off += thisTime;
             }

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1160619&r1=1160618&r2=1160619&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Tue Aug 23 11:00:02 2011
@@ -487,11 +487,11 @@ public class AjpProcessor extends Abstra
                     thisTime = chunkSize;
                 }
                 len -= thisTime;
-                responseHeaderMessage.reset();
-                responseHeaderMessage.appendByte(Constants.JK_AJP13_SEND_BODY_CHUNK);
-                responseHeaderMessage.appendBytes(chunk.getBytes(), chunk.getOffset() + off,
thisTime);
-                responseHeaderMessage.end();
-                output.write(responseHeaderMessage.getBuffer(), 0, responseHeaderMessage.getLen());
+                responseMessage.reset();
+                responseMessage.appendByte(Constants.JK_AJP13_SEND_BODY_CHUNK);
+                responseMessage.appendBytes(chunk.getBytes(), chunk.getOffset() + off, thisTime);
+                responseMessage.end();
+                output.write(responseMessage.getBuffer(), 0, responseMessage.getLen());
 
                 off += thisTime;
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message