You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/10/22 22:59:41 UTC

svn commit: r1187780 [2/2] - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/ http11/filters/

Modified: tomcat/trunk/java/org/apache/coyote/http11/InputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InputFilter.java Sat Oct 22 20:59:39 2011
@@ -25,7 +25,7 @@ import org.apache.tomcat.util.buf.ByteCh
 
 /**
  * Input filter interface.
- * 
+ *
  * @author Remy Maucherat
  */
 public interface InputFilter extends InputBuffer {
@@ -33,7 +33,7 @@ public interface InputFilter extends Inp
 
     /**
      * Read bytes.
-     * 
+     *
      * @return Number of bytes read.
      */
     @Override
@@ -42,7 +42,7 @@ public interface InputFilter extends Inp
 
 
     /**
-     * Some filters need additional parameters from the request. All the 
+     * Some filters need additional parameters from the request. All the
      * necessary reading can occur in that method, as this method is called
      * after the request header processing is complete.
      */
@@ -69,7 +69,7 @@ public interface InputFilter extends Inp
 
     /**
      * End the current request.
-     * 
+     *
      * @return 0 is the expected return value. A positive value indicates that
      * too many bytes were read. This method is allowed to use buffer.doRead
      * to consume extra bytes. The result of this method can't be negative (if

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Sat Oct 22 20:59:39 2011
@@ -70,7 +70,7 @@ public class InternalAprInputBuffer exte
 
         parsingHeader = true;
         swallowInput = true;
-        
+
     }
 
 
@@ -92,7 +92,7 @@ public class InternalAprInputBuffer exte
     // --------------------------------------------------------- Public Methods
 
     /**
-     * Recycle the input buffer. This should be called when closing the 
+     * Recycle the input buffer. This should be called when closing the
      * connection.
      */
     @Override
@@ -103,14 +103,14 @@ public class InternalAprInputBuffer exte
 
 
     /**
-     * Read the request line. This function is meant to be used during the 
-     * HTTP request header parsing. Do NOT attempt to read the request body 
+     * Read the request line. This function is meant to be used during the
+     * HTTP request header parsing. Do NOT attempt to read the request body
      * using it.
      *
      * @throws IOException If an exception occurs during the underlying socket
      * read operations, or if the given buffer is not big enough to accommodate
      * the whole line.
-     * @return true if data is properly fed; false if no data is available 
+     * @return true if data is properly fed; false if no data is available
      * immediately and thread should be freed
      */
     @Override
@@ -219,13 +219,13 @@ public class InternalAprInputBuffer exte
             if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
                 space = true;
                 end = pos;
-            } else if ((buf[pos] == Constants.CR) 
+            } else if ((buf[pos] == Constants.CR)
                        || (buf[pos] == Constants.LF)) {
                 // HTTP/0.9 style request
                 eol = true;
                 space = true;
                 end = pos;
-            } else if ((buf[pos] == Constants.QUESTION) 
+            } else if ((buf[pos] == Constants.QUESTION)
                        && (questionPos == -1)) {
                 questionPos = pos;
             }
@@ -236,7 +236,7 @@ public class InternalAprInputBuffer exte
 
         request.unparsedURI().setBytes(buf, start, end - start);
         if (questionPos >= 0) {
-            request.queryString().setBytes(buf, questionPos + 1, 
+            request.queryString().setBytes(buf, questionPos + 1,
                                            end - questionPos - 1);
             request.requestURI().setBytes(buf, start, questionPos - start);
         } else {
@@ -292,7 +292,7 @@ public class InternalAprInputBuffer exte
         } else {
             request.protocol().setString("");
         }
-        
+
         return true;
 
     }
@@ -317,7 +317,7 @@ public class InternalAprInputBuffer exte
 
     /**
      * Parse an HTTP header.
-     * 
+     *
      * @return false after reading a blank line (which indicates that the
      * HTTP header parsing is done
      */
@@ -481,14 +481,14 @@ public class InternalAprInputBuffer exte
 
     }
 
-    
+
     private void skipLine(int start) throws IOException {
         boolean eol = false;
         int lastRealByte = start;
         if (pos - 1 > start) {
             lastRealByte = pos - 1;
         }
-        
+
         while (!eol) {
 
             // Read new bytes if needed
@@ -512,8 +512,8 @@ public class InternalAprInputBuffer exte
                     lastRealByte - start + 1, Charset.forName("ISO-8859-1"))));
         }
     }
-    
-    
+
+
     /**
      * Available bytes (note that due to encoding, this may not correspond )
      */
@@ -535,7 +535,7 @@ public class InternalAprInputBuffer exte
      * Read some bytes.
      */
     @Override
-    public int doRead(ByteChunk chunk, Request req) 
+    public int doRead(ByteChunk chunk, Request req)
         throws IOException {
 
         if (lastActiveFilter == -1)
@@ -562,11 +562,11 @@ public class InternalAprInputBuffer exte
         // Ignore the block parameter and just call fill
         return fill();
     }
-    
-    
+
+
     /**
      * Fill the internal buffer using data from the underlying input stream.
-     * 
+     *
      * @return false if at end of stream
      */
     protected boolean fill()
@@ -598,7 +598,7 @@ public class InternalAprInputBuffer exte
         } else {
 
             if (buf.length - end < 4500) {
-                // In this case, the request header was really large, so we allocate a 
+                // In this case, the request header was really large, so we allocate a
                 // brand new one; the old one will get GCed when subsequent requests
                 // clear all references
                 buf = new byte[buf.length];
@@ -637,7 +637,7 @@ public class InternalAprInputBuffer exte
      * This class is an input buffer which will read its data from an input
      * stream.
      */
-    protected class SocketInputBuffer 
+    protected class SocketInputBuffer
         implements InputBuffer {
 
 
@@ -645,7 +645,7 @@ public class InternalAprInputBuffer exte
          * Read bytes into the specified chunk.
          */
         @Override
-        public int doRead(ByteChunk chunk, Request req ) 
+        public int doRead(ByteChunk chunk, Request req )
             throws IOException {
 
             if (pos >= lastValid) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Sat Oct 22 20:59:39 2011
@@ -31,7 +31,7 @@ import org.apache.tomcat.util.net.Socket
 
 /**
  * Output buffer.
- * 
+ *
  * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  */
 public class InternalAprOutputBuffer extends AbstractOutputBuffer<Long> {
@@ -82,7 +82,7 @@ public class InternalAprOutputBuffer ext
      */
     private ByteBuffer bbuf = null;
 
-    
+
     // --------------------------------------------------------- Public Methods
 
     @Override
@@ -96,7 +96,7 @@ public class InternalAprOutputBuffer ext
 
     /**
      * Flush the response.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
      */
     @Override
@@ -111,21 +111,21 @@ public class InternalAprOutputBuffer ext
 
 
     /**
-     * Recycle the output buffer. This should be called when closing the 
+     * Recycle the output buffer. This should be called when closing the
      * connection.
      */
     @Override
     public void recycle() {
 
         super.recycle();
-        
+
         bbuf.clear();
     }
 
 
     /**
      * End request.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
      */
     @Override
@@ -135,7 +135,7 @@ public class InternalAprOutputBuffer ext
         if (!committed) {
 
             // Send the connector a request for commit. The connector should
-            // then validate the headers, send them (using sendHeader) and 
+            // then validate the headers, send them (using sendHeader) and
             // set the filters accordingly.
             response.action(ActionCode.COMMIT, null);
 
@@ -177,7 +177,7 @@ public class InternalAprOutputBuffer ext
 
     /**
      * Commit the response.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
      */
     @Override
@@ -223,7 +223,7 @@ public class InternalAprOutputBuffer ext
          * Write chunk.
          */
         @Override
-        public int doWrite(ByteChunk chunk, Response res) 
+        public int doWrite(ByteChunk chunk, Response res)
             throws IOException {
 
             int len = chunk.getLength();

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java Sat Oct 22 20:59:39 2011
@@ -69,10 +69,10 @@ public class InternalInputBuffer extends
 
     }
 
-    
+
     /**
-     * Read the request line. This function is meant to be used during the 
-     * HTTP request header parsing. Do NOT attempt to read the request body 
+     * Read the request line. This function is meant to be used during the
+     * HTTP request header parsing. Do NOT attempt to read the request body
      * using it.
      *
      * @throws IOException If an exception occurs during the underlying socket
@@ -81,7 +81,7 @@ public class InternalInputBuffer extends
      */
     @Override
     public boolean parseRequestLine(boolean useAvailableDataOnly)
-    
+
         throws IOException {
 
         int start = 0;
@@ -138,7 +138,7 @@ public class InternalInputBuffer extends
 
         }
 
-        
+
         // Spec says single SP but also says be tolerant of multiple and/or HT
         while (space) {
             // Read new bytes if needed
@@ -176,13 +176,13 @@ public class InternalInputBuffer extends
             if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
                 space = true;
                 end = pos;
-            } else if ((buf[pos] == Constants.CR) 
+            } else if ((buf[pos] == Constants.CR)
                        || (buf[pos] == Constants.LF)) {
                 // HTTP/0.9 style request
                 eol = true;
                 space = true;
                 end = pos;
-            } else if ((buf[pos] == Constants.QUESTION) 
+            } else if ((buf[pos] == Constants.QUESTION)
                        && (questionPos == -1)) {
                 questionPos = pos;
             }
@@ -193,7 +193,7 @@ public class InternalInputBuffer extends
 
         request.unparsedURI().setBytes(buf, start, end - start);
         if (questionPos >= 0) {
-            request.queryString().setBytes(buf, questionPos + 1, 
+            request.queryString().setBytes(buf, questionPos + 1,
                                            end - questionPos - 1);
             request.requestURI().setBytes(buf, start, questionPos - start);
         } else {
@@ -248,7 +248,7 @@ public class InternalInputBuffer extends
         } else {
             request.protocol().setString("");
         }
-        
+
         return true;
 
     }
@@ -273,7 +273,7 @@ public class InternalInputBuffer extends
 
     /**
      * Parse an HTTP header.
-     * 
+     *
      * @return false after reading a blank line (which indicates that the
      * HTTP header parsing is done
      */
@@ -463,7 +463,7 @@ public class InternalInputBuffer extends
         if (pos - 1 > start) {
             lastRealByte = pos - 1;
         }
-        
+
         while (!eol) {
 
             // Read new bytes if needed
@@ -490,7 +490,7 @@ public class InternalInputBuffer extends
 
     /**
      * Fill the internal buffer using data from the underlying input stream.
-     * 
+     *
      * @return false if at end of stream
      */
     protected boolean fill() throws IOException {
@@ -517,7 +517,7 @@ public class InternalInputBuffer extends
         } else {
 
             if (buf.length - end < 4500) {
-                // In this case, the request header was really large, so we allocate a 
+                // In this case, the request header was really large, so we allocate a
                 // brand new one; the old one will get GCed when subsequent requests
                 // clear all references
                 buf = new byte[buf.length];
@@ -544,7 +544,7 @@ public class InternalInputBuffer extends
      * This class is an input buffer which will read its data from an input
      * stream.
      */
-    protected class InputStreamInputBuffer 
+    protected class InputStreamInputBuffer
         implements InputBuffer {
 
 
@@ -552,7 +552,7 @@ public class InternalInputBuffer extends
          * Read bytes into the specified chunk.
          */
         @Override
-        public int doRead(ByteChunk chunk, Request req ) 
+        public int doRead(ByteChunk chunk, Request req )
             throws IOException {
 
             if (pos >= lastValid) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Sat Oct 22 20:59:39 2011
@@ -92,7 +92,7 @@ public class InternalNioInputBuffer exte
     }
 
     // ----------------------------------------------------------- Constructors
-    
+
 
     /**
      * Alternate constructor.
@@ -137,7 +137,7 @@ public class InternalNioInputBuffer exte
      * Underlying socket.
      */
     private NioChannel socket;
-    
+
     /**
      * Selector pool, for blocking reads and blocking writes
      */
@@ -170,7 +170,7 @@ public class InternalNioInputBuffer exte
     // --------------------------------------------------------- Public Methods
 
     /**
-     * Recycle the input buffer. This should be called when closing the 
+     * Recycle the input buffer. This should be called when closing the
      * connection.
      */
     @Override
@@ -194,7 +194,7 @@ public class InternalNioInputBuffer exte
 
     /**
      * End processing of current HTTP request.
-     * Note: All bytes of the current request should have been already 
+     * Note: All bytes of the current request should have been already
      * consumed. This method only resets all the pointers so that we are ready
      * to parse the next HTTP request.
      */
@@ -211,14 +211,14 @@ public class InternalNioInputBuffer exte
     }
 
     /**
-     * Read the request line. This function is meant to be used during the 
-     * HTTP request header parsing. Do NOT attempt to read the request body 
+     * Read the request line. This function is meant to be used during the
+     * HTTP request header parsing. Do NOT attempt to read the request body
      * using it.
      *
      * @throws IOException If an exception occurs during the underlying socket
      * read operations, or if the given buffer is not big enough to accommodate
      * the whole line.
-     * @return true if data is properly fed; false if no data is available 
+     * @return true if data is properly fed; false if no data is available
      * immediately and thread should be freed
      */
     @Override
@@ -233,7 +233,7 @@ public class InternalNioInputBuffer exte
         if ( parsingRequestLinePhase == 0 ) {
             byte chr = 0;
             do {
-                
+
                 // Read new bytes if needed
                 if (pos >= lastValid) {
                     if (useAvailableDataOnly) {
@@ -308,7 +308,7 @@ public class InternalNioInputBuffer exte
         }
         if (parsingRequestLinePhase == 4) {
             // Mark the current buffer position
-            
+
             int end = 0;
             //
             // Reading the URI
@@ -323,13 +323,13 @@ public class InternalNioInputBuffer exte
                 if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
                     space = true;
                     end = pos;
-                } else if ((buf[pos] == Constants.CR) 
+                } else if ((buf[pos] == Constants.CR)
                            || (buf[pos] == Constants.LF)) {
                     // HTTP/0.9 style request
                     parsingRequestLineEol = true;
                     space = true;
                     end = pos;
-                } else if ((buf[pos] == Constants.QUESTION) 
+                } else if ((buf[pos] == Constants.QUESTION)
                            && (parsingRequestLineQPos == -1)) {
                     parsingRequestLineQPos = pos;
                 }
@@ -337,7 +337,7 @@ public class InternalNioInputBuffer exte
             }
             request.unparsedURI().setBytes(buf, parsingRequestLineStart, end - parsingRequestLineStart);
             if (parsingRequestLineQPos >= 0) {
-                request.queryString().setBytes(buf, parsingRequestLineQPos + 1, 
+                request.queryString().setBytes(buf, parsingRequestLineQPos + 1,
                                                end - parsingRequestLineQPos - 1);
                 request.requestURI().setBytes(buf, parsingRequestLineStart, parsingRequestLineQPos - parsingRequestLineStart);
             } else {
@@ -363,9 +363,9 @@ public class InternalNioInputBuffer exte
             parsingRequestLineStart = pos;
             parsingRequestLinePhase = 6;
         }
-        if (parsingRequestLinePhase == 6) { 
+        if (parsingRequestLinePhase == 6) {
             // Mark the current buffer position
-            
+
             end = 0;
             //
             // Reading the protocol
@@ -377,7 +377,7 @@ public class InternalNioInputBuffer exte
                     if (!fill(true, false)) //request line parsing
                         return false;
                 }
-        
+
                 if (buf[pos] == Constants.CR) {
                     end = pos;
                 } else if (buf[pos] == Constants.LF) {
@@ -387,7 +387,7 @@ public class InternalNioInputBuffer exte
                 }
                 pos++;
             }
-        
+
             if ( (end - parsingRequestLineStart) > 0) {
                 request.protocol().setBytes(buf, parsingRequestLineStart, end - parsingRequestLineStart);
             } else {
@@ -401,7 +401,7 @@ public class InternalNioInputBuffer exte
         }
         throw new IllegalStateException("Invalid request line parse phase:"+parsingRequestLinePhase);
     }
-    
+
     private void expand(int newsize) {
         if ( newsize > buf.length ) {
             if (parsingHeader) {
@@ -416,7 +416,7 @@ public class InternalNioInputBuffer exte
             buf = tmp;
         }
     }
-    
+
     /**
      * Perform blocking read with a timeout if desired
      * @param timeout boolean - if we want to use the timeout data
@@ -425,7 +425,7 @@ public class InternalNioInputBuffer exte
      * @throws IOException if a socket exception occurs
      * @throws EOFException if end of stream is reached
      */
-    
+
     private int readSocket(boolean timeout, boolean block) throws IOException {
         int nRead = 0;
         socket.getBufHandler().getReadBuffer().clear();
@@ -442,7 +442,7 @@ public class InternalNioInputBuffer exte
                 nRead = pool.read(socket.getBufHandler().getReadBuffer(),socket,selector,att.getTimeout());
             } catch ( EOFException eof ) {
                 nRead = -1;
-            } finally { 
+            } finally {
                 if ( selector != null ) pool.put(selector);
             }
         } else {
@@ -470,7 +470,7 @@ public class InternalNioInputBuffer exte
     public boolean parseHeaders()
         throws IOException {
         HeaderParseStatus status = HeaderParseStatus.HAVE_MORE_HEADERS;
-        
+
         do {
             status = parseHeader();
         } while ( status == HeaderParseStatus.HAVE_MORE_HEADERS );
@@ -499,7 +499,7 @@ public class InternalNioInputBuffer exte
 
     /**
      * Parse an HTTP header.
-     * 
+     *
      * @return false after reading a blank line (which indicates that the
      * HTTP header parsing is done
      */
@@ -515,7 +515,7 @@ public class InternalNioInputBuffer exte
 
             // Read new bytes if needed
             if (pos >= lastValid) {
-                if (!fill(true,false)) {//parse header 
+                if (!fill(true,false)) {//parse header
                     headerParsePos = HeaderParsePosition.HEADER_START;
                     return HeaderParseStatus.NEED_MORE_DATA;
                 }
@@ -551,7 +551,7 @@ public class InternalNioInputBuffer exte
 
             // Read new bytes if needed
             if (pos >= lastValid) {
-                if (!fill(true,false)) { //parse header 
+                if (!fill(true,false)) { //parse header
                     return HeaderParseStatus.NEED_MORE_DATA;
                 }
             }
@@ -598,7 +598,7 @@ public class InternalNioInputBuffer exte
                 while (true) {
                     // Read new bytes if needed
                     if (pos >= lastValid) {
-                        if (!fill(true,false)) {//parse header 
+                        if (!fill(true,false)) {//parse header
                             //HEADER_VALUE_START
                             return HeaderParseStatus.NEED_MORE_DATA;
                         }
@@ -621,7 +621,7 @@ public class InternalNioInputBuffer exte
 
                     // Read new bytes if needed
                     if (pos >= lastValid) {
-                        if (!fill(true,false)) {//parse header 
+                        if (!fill(true,false)) {//parse header
                             //HEADER_VALUE
                             return HeaderParseStatus.NEED_MORE_DATA;
                         }
@@ -654,7 +654,7 @@ public class InternalNioInputBuffer exte
             // Read new bytes if needed
             if (pos >= lastValid) {
                 if (!fill(true,false)) {//parse header
-                    
+
                     //HEADER_MULTI_LINE
                     return HeaderParseStatus.NEED_MORE_DATA;
                 }
@@ -680,7 +680,7 @@ public class InternalNioInputBuffer exte
         headerData.recycle();
         return HeaderParseStatus.HAVE_MORE_HEADERS;
     }
-    
+
     public int getParsingRequestLinePhase() {
         return parsingRequestLinePhase;
     }
@@ -794,7 +794,7 @@ public class InternalNioInputBuffer exte
 
     /**
      * Fill the internal buffer using data from the underlying input stream.
-     * 
+     *
      * @return false if at end of stream
      */
     @Override
@@ -803,7 +803,7 @@ public class InternalNioInputBuffer exte
     }
 
     protected boolean fill(boolean timeout, boolean block) throws IOException, EOFException {
-        
+
 
         boolean read = false;
 
@@ -832,7 +832,7 @@ public class InternalNioInputBuffer exte
      * This class is an input buffer which will read its data from an input
      * stream.
      */
-    protected class SocketInputBuffer 
+    protected class SocketInputBuffer
         implements InputBuffer {
 
 
@@ -840,7 +840,7 @@ public class InternalNioInputBuffer exte
          * Read bytes into the specified chunk.
          */
         @Override
-        public int doRead(ByteChunk chunk, Request req ) 
+        public int doRead(ByteChunk chunk, Request req )
             throws IOException {
 
             if (pos >= lastValid) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Sat Oct 22 20:59:39 2011
@@ -35,7 +35,7 @@ import org.apache.tomcat.util.net.Socket
 
 /**
  * Output buffer.
- * 
+ *
  * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  * @author Filip Hanik
  */
@@ -51,7 +51,7 @@ public class InternalNioOutputBuffer ext
         this.response = response;
 
         buf = new byte[headerBufferSize];
-        
+
         outputStreamOutputBuffer = new SocketOutputBuffer();
 
         filterLibrary = new OutputFilter[0];
@@ -60,7 +60,7 @@ public class InternalNioOutputBuffer ext
 
         committed = false;
         finished = false;
-        
+
         // Cause loading of HttpMessages
         HttpMessages.getMessage(200);
 
@@ -76,7 +76,7 @@ public class InternalNioOutputBuffer ext
      * Underlying socket.
      */
     private NioChannel socket;
-    
+
     /**
      * Selector pool, for blocking reads and blocking writes
      */
@@ -88,9 +88,9 @@ public class InternalNioOutputBuffer ext
 
     /**
      * Flush the response.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
-     * 
+     *
      */
     @Override
     public void flush() throws IOException {
@@ -103,7 +103,7 @@ public class InternalNioOutputBuffer ext
 
 
     /**
-     * Recycle the output buffer. This should be called when closing the 
+     * Recycle the output buffer. This should be called when closing the
      * connection.
      */
     @Override
@@ -119,7 +119,7 @@ public class InternalNioOutputBuffer ext
 
     /**
      * End request.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
      */
     @Override
@@ -131,7 +131,7 @@ public class InternalNioOutputBuffer ext
     // ------------------------------------------------ HTTP/1.1 Output Methods
 
 
-    /** 
+    /**
      * Send an acknowledgment.
      */
     @Override
@@ -139,14 +139,14 @@ public class InternalNioOutputBuffer ext
 
         if (!committed) {
             //Socket.send(socket, Constants.ACK_BYTES, 0, Constants.ACK_BYTES.length) < 0
-            socket.getBufHandler() .getWriteBuffer().put(Constants.ACK_BYTES,0,Constants.ACK_BYTES.length);    
+            socket.getBufHandler() .getWriteBuffer().put(Constants.ACK_BYTES,0,Constants.ACK_BYTES.length);
             writeToSocket(socket.getBufHandler() .getWriteBuffer(),true,true);
         }
 
     }
 
     /**
-     * 
+     *
      * @param bytebuffer ByteBuffer
      * @param flip boolean
      * @return int
@@ -168,16 +168,16 @@ public class InternalNioOutputBuffer ext
         }
         try {
             written = pool.write(bytebuffer, socket, selector, writeTimeout, block,lastWrite);
-            //make sure we are flushed 
+            //make sure we are flushed
             do {
                 if (socket.flush(true,selector,writeTimeout,lastWrite)) break;
             }while ( true );
-        }finally { 
+        }finally {
             if ( selector != null ) pool.put(selector);
         }
         if ( block ) bytebuffer.clear(); //only clear
         return written;
-    } 
+    }
 
 
     // ------------------------------------------------------ Protected Methods
@@ -193,7 +193,7 @@ public class InternalNioOutputBuffer ext
 
     /**
      * Commit the response.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
      */
     @Override
@@ -258,7 +258,7 @@ public class InternalNioOutputBuffer ext
      * This class is an output buffer which will write data to an output
      * stream.
      */
-    protected class SocketOutputBuffer 
+    protected class SocketOutputBuffer
         implements OutputBuffer {
 
 
@@ -266,7 +266,7 @@ public class InternalNioOutputBuffer ext
          * Write chunk.
          */
         @Override
-        public int doWrite(ByteChunk chunk, Response res) 
+        public int doWrite(ByteChunk chunk, Response res)
             throws IOException {
 
             int len = chunk.getLength();

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java Sat Oct 22 20:59:39 2011
@@ -29,7 +29,7 @@ import org.apache.tomcat.util.net.Socket
 
 /**
  * Output buffer.
- * 
+ *
  * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  */
 public class InternalOutputBuffer extends AbstractOutputBuffer<Socket>
@@ -75,8 +75,8 @@ public class InternalOutputBuffer extend
     /**
      * Socket buffer (extra buffering to reduce number of packets sent).
      */
-    private boolean useSocketBuffer = false;    
-    
+    private boolean useSocketBuffer = false;
+
 
     /**
      * Set the socket buffer size.
@@ -105,7 +105,7 @@ public class InternalOutputBuffer extend
 
     /**
      * Flush the response.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
      */
     @Override
@@ -113,7 +113,7 @@ public class InternalOutputBuffer extend
         throws IOException {
 
         super.flush();
-        
+
         // Flush the current buffer
         if (useSocketBuffer) {
             socketBuffer.flushBuffer();
@@ -123,7 +123,7 @@ public class InternalOutputBuffer extend
 
 
     /**
-     * Recycle the output buffer. This should be called when closing the 
+     * Recycle the output buffer. This should be called when closing the
      * connection.
      */
     @Override
@@ -136,7 +136,7 @@ public class InternalOutputBuffer extend
 
     /**
      * End processing of current HTTP request.
-     * Note: All bytes of the current request should have been already 
+     * Note: All bytes of the current request should have been already
      * consumed. This method only resets all the pointers so that we are ready
      * to parse the next HTTP request.
      */
@@ -149,7 +149,7 @@ public class InternalOutputBuffer extend
 
     /**
      * End request.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
      */
     @Override
@@ -183,7 +183,7 @@ public class InternalOutputBuffer extend
 
     /**
      * Commit the response.
-     * 
+     *
      * @throws IOException an underlying I/O error occurred
      */
     @Override
@@ -225,7 +225,7 @@ public class InternalOutputBuffer extend
      * This class is an output buffer which will write data to an output
      * stream.
      */
-    protected class OutputStreamOutputBuffer 
+    protected class OutputStreamOutputBuffer
         implements OutputBuffer {
 
 
@@ -233,15 +233,15 @@ public class InternalOutputBuffer extend
          * Write chunk.
          */
         @Override
-        public int doWrite(ByteChunk chunk, Response res) 
+        public int doWrite(ByteChunk chunk, Response res)
             throws IOException {
 
             int length = chunk.getLength();
             if (useSocketBuffer) {
-                socketBuffer.append(chunk.getBuffer(), chunk.getStart(), 
+                socketBuffer.append(chunk.getBuffer(), chunk.getStart(),
                                     length);
             } else {
-                outputStream.write(chunk.getBuffer(), chunk.getStart(), 
+                outputStream.write(chunk.getBuffer(), chunk.getStart(),
                                    length);
             }
             byteCount += chunk.getLength();

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties Sat Oct 22 20:59:39 2011
@@ -20,6 +20,6 @@ http11protocol.proto.ioexception.info=\u
 http11protocol.proto.socketexception.debug=\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u4e2d\u306eSocketException\u3067\u3059
 http11protocol.proto.socketexception.info=\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u4e2d\u306eSocketException\u3067\u3059\u304c\u3001\u7121\u8996\u3055\u308c\u307e\u3057\u305f
 http11protocol.start=Coyote HTTP/1.1\u3092 {0} \u3067\u8d77\u52d5\u3057\u307e\u3059
- 
+
 iib.eof.error=\u30bd\u30b1\u30c3\u30c8\u304b\u3089\u4e88\u671f\u3057\u306a\u3044EOF\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3057\u305f
 iib.requestheadertoolarge.error=\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u304c\u9577\u3059\u304e\u307e\u3059

Modified: tomcat/trunk/java/org/apache/coyote/http11/OutputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/OutputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/OutputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/OutputFilter.java Sat Oct 22 20:59:39 2011
@@ -25,7 +25,7 @@ import org.apache.tomcat.util.buf.ByteCh
 
 /**
  * Output filter.
- * 
+ *
  * @author Remy Maucherat
  */
 public interface OutputFilter extends OutputBuffer {
@@ -33,7 +33,7 @@ public interface OutputFilter extends Ou
 
     /**
      * Write some bytes.
-     * 
+     *
      * @return number of bytes written by the filter
      */
     @Override
@@ -42,7 +42,7 @@ public interface OutputFilter extends Ou
 
 
     /**
-     * Some filters need additional parameters from the response. All the 
+     * Some filters need additional parameters from the response. All the
      * necessary reading can occur in that method, as this method is called
      * after the response header processing is complete.
      */
@@ -64,10 +64,10 @@ public interface OutputFilter extends Ou
     /**
      * End the current request. It is acceptable to write extra bytes using
      * buffer.doWrite during the execution of this method.
-     * 
-     * @return Should return 0 unless the filter does some content length 
+     *
+     * @return Should return 0 unless the filter does some content length
      * delimitation, in which case the number is the amount of extra bytes or
-     * missing bytes, which would indicate an error. 
+     * missing bytes, which would indicate an error.
      * Note: It is recommended that extra bytes be swallowed by the filter.
      */
     public long end()

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/BufferedInputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/BufferedInputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/BufferedInputFilter.java Sat Oct 22 20:59:39 2011
@@ -137,5 +137,5 @@ public class BufferedInputFilter impleme
     public int available() {
         return buffered.getLength();
     }
-    
+
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java Sat Oct 22 20:59:39 2011
@@ -33,7 +33,7 @@ import org.apache.tomcat.util.http.MimeH
 /**
  * Chunked input filter. Parses chunked data according to
  * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1</a><br>
- * 
+ *
  * @author Remy Maucherat
  * @author Filip Hanik
  */
@@ -117,7 +117,7 @@ public class ChunkedInputFilter implemen
      * Request being parsed.
      */
     private Request request;
-    
+
     // ----------------------------------------------------------- Constructors
     public ChunkedInputFilter(int maxTrailerSize) {
         this.trailingHeaders.setLimit(maxTrailerSize);
@@ -128,10 +128,10 @@ public class ChunkedInputFilter implemen
 
     /**
      * Read bytes.
-     * 
+     *
      * @return If the filter does request length control, this value is
      * significant; it should be the number of bytes consumed from the buffer,
-     * up until the end of the current request body, or the buffer length, 
+     * up until the end of the current request body, or the buffer length,
      * whichever is greater. If the filter does not do request body length
      * control, the returned value should be -1.
      */
@@ -174,7 +174,7 @@ public class ChunkedInputFilter implemen
             pos = pos + remaining;
             remaining = 0;
             //we need a CRLF
-            if ((pos+1) >= lastValid) {   
+            if ((pos+1) >= lastValid) {
                 //if we call parseCRLF we overrun the buffer here
                 //so we defer it to the next call BZ 11117
                 needCRLFParse = true;
@@ -225,7 +225,7 @@ public class ChunkedInputFilter implemen
     public int available() {
         return (lastValid - pos);
     }
-    
+
 
     /**
      * Set the next buffer in the filter pipeline.
@@ -250,7 +250,7 @@ public class ChunkedInputFilter implemen
 
 
     /**
-     * Return the name of the associated encoding; Here, the value is 
+     * Return the name of the associated encoding; Here, the value is
      * "identity".
      */
     @Override
@@ -280,10 +280,10 @@ public class ChunkedInputFilter implemen
 
     /**
      * Parse the header of a chunk.
-     * A chunk header can look like 
+     * A chunk header can look like
      * A10CRLF
      * F23;chunk-extension to be ignoredCRLF
-     * The letters before CRLF but after the trailer mark, must be valid hex digits, 
+     * The letters before CRLF but after the trailer mark, must be valid hex digits,
      * we should not parse F23IAMGONNAMESSTHISUP34CRLF as a valid header
      * according to spec
      */
@@ -303,12 +303,12 @@ public class ChunkedInputFilter implemen
             }
 
             if (buf[pos] == Constants.CR) {
-                // FIXME: Improve parsing to check for CRLF 
+                // FIXME: Improve parsing to check for CRLF
             } else if (buf[pos] == Constants.LF) {
                 eol = true;
             } else if (buf[pos] == Constants.SEMI_COLON) {
                 trailer = true;
-            } else if (!trailer) { 
+            } else if (!trailer) {
                 //don't read data after the trailer
                 if (HexUtils.getDec(buf[pos]) != -1) {
                     readDigit = true;
@@ -386,7 +386,7 @@ public class ChunkedInputFilter implemen
         }
     }
 
-    
+
     private boolean parseHeader() throws IOException {
 
         MimeHeaders headers = request.getMimeHeaders();
@@ -400,7 +400,7 @@ public class ChunkedInputFilter implemen
             }
 
             chr = buf[pos];
-    
+
             if ((chr == Constants.CR) || (chr == Constants.LF)) {
                 if (chr == Constants.LF) {
                     pos++;
@@ -409,28 +409,28 @@ public class ChunkedInputFilter implemen
             } else {
                 break;
             }
-    
+
             pos++;
-    
+
         }
-    
+
         // Mark the current buffer position
         int start = trailingHeaders.getEnd();
-    
+
         //
         // Reading the header name
         // Header name is always US-ASCII
         //
-    
+
         boolean colon = false;
         while (!colon) {
-    
+
             // Read new bytes if needed
             if (pos >= lastValid) {
                 if (readBytes() <0)
                     throw new EOFException("Unexpected end of stream whilst reading trailer headers for chunked request");
             }
-    
+
             chr = buf[pos];
             if ((chr >= Constants.A) && (chr <= Constants.Z)) {
                 chr = (byte) (chr - Constants.LC_OFFSET);
@@ -441,55 +441,55 @@ public class ChunkedInputFilter implemen
             } else {
                 trailingHeaders.append(chr);
             }
-    
+
             pos++;
-    
+
         }
         MessageBytes headerValue = headers.addValue(trailingHeaders.getBytes(),
                 start, trailingHeaders.getEnd() - start);
-    
+
         // Mark the current buffer position
         start = trailingHeaders.getEnd();
 
         //
         // Reading the header value (which can be spanned over multiple lines)
         //
-    
+
         boolean eol = false;
         boolean validLine = true;
         int lastSignificantChar = 0;
-    
+
         while (validLine) {
-    
+
             boolean space = true;
-    
+
             // Skipping spaces
             while (space) {
-    
+
                 // Read new bytes if needed
                 if (pos >= lastValid) {
                     if (readBytes() <0)
                         throw new EOFException("Unexpected end of stream whilst reading trailer headers for chunked request");
                 }
-    
+
                 chr = buf[pos];
                 if ((chr == Constants.SP) || (chr == Constants.HT)) {
                     pos++;
                 } else {
                     space = false;
                 }
-    
+
             }
-    
+
             // Reading bytes until the end of the line
             while (!eol) {
-    
+
                 // Read new bytes if needed
                 if (pos >= lastValid) {
                     if (readBytes() <0)
                         throw new EOFException("Unexpected end of stream whilst reading trailer headers for chunked request");
                 }
-    
+
                 chr = buf[pos];
                 if (chr == Constants.CR) {
                     // Skip
@@ -501,20 +501,20 @@ public class ChunkedInputFilter implemen
                     trailingHeaders.append(chr);
                     lastSignificantChar = trailingHeaders.getEnd();
                 }
-    
+
                 pos++;
-    
+
             }
-    
+
             // Checking the first character of the new line. If the character
             // is a LWS, then it's a multiline header
-    
+
             // Read new bytes if needed
             if (pos >= lastValid) {
                 if (readBytes() <0)
                     throw new EOFException("Unexpected end of stream whilst reading trailer headers for chunked request");
             }
-    
+
             chr = buf[pos];
             if ((chr != Constants.SP) && (chr != Constants.HT)) {
                 validLine = false;
@@ -524,13 +524,13 @@ public class ChunkedInputFilter implemen
                 // be at least one space inserted between the lines)
                 trailingHeaders.append(chr);
             }
-    
+
         }
-    
+
         // Set the header value
         headerValue.setBytes(trailingHeaders.getBytes(), start,
                 lastSignificantChar - start);
-    
+
         return true;
     }
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java Sat Oct 22 20:59:39 2011
@@ -27,7 +27,7 @@ import org.apache.tomcat.util.buf.HexUti
 
 /**
  * Chunked output filter.
- * 
+ *
  * @author Remy Maucherat
  */
 public class ChunkedOutputFilter implements OutputFilter {
@@ -44,7 +44,7 @@ public class ChunkedOutputFilter impleme
 
 
     static {
-        byte[] END_CHUNK_BYTES = {(byte) '0', (byte) '\r', (byte) '\n', 
+        byte[] END_CHUNK_BYTES = {(byte) '0', (byte) '\r', (byte) '\n',
                                   (byte) '\r', (byte) '\n'};
         END_CHUNK.setBytes(END_CHUNK_BYTES, 0, END_CHUNK_BYTES.length);
     }
@@ -92,7 +92,7 @@ public class ChunkedOutputFilter impleme
 
     /**
      * Write some bytes.
-     * 
+     *
      * @return number of bytes written by the filter
      */
     @Override
@@ -136,7 +136,7 @@ public class ChunkedOutputFilter impleme
 
 
     /**
-     * Some filters need additional parameters from the response. All the 
+     * Some filters need additional parameters from the response. All the
      * necessary reading can occur in that method, as this method is called
      * after the response header processing is complete.
      */
@@ -165,7 +165,7 @@ public class ChunkedOutputFilter impleme
 
         // Write end chunk
         buffer.doWrite(END_CHUNK, null);
-        
+
         return 0;
 
     }

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java Sat Oct 22 20:59:39 2011
@@ -28,7 +28,7 @@ import java.util.zip.GZIPOutputStream;
  * (<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4255743">Bug
  * 4255743</a> and
  * <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4813885">Bug
- * 4813885</a>) so the GZIP'd output can be flushed. 
+ * 4813885</a>) so the GZIP'd output can be flushed.
  */
 public class FlushableGZIPOutputStream extends GZIPOutputStream {
     public FlushableGZIPOutputStream(OutputStream os) throws IOException {

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java Sat Oct 22 20:59:39 2011
@@ -28,7 +28,7 @@ import org.apache.tomcat.util.buf.ByteCh
 
 /**
  * Gzip output filter.
- * 
+ *
  * @author Remy Maucherat
  */
 public class GzipOutputFilter implements OutputFilter {
@@ -67,7 +67,7 @@ public class GzipOutputFilter implements
 
     /**
      * Write some bytes.
-     * 
+     *
      * @return number of bytes written by the filter
      */
     @Override
@@ -76,7 +76,7 @@ public class GzipOutputFilter implements
         if (compressionStream == null) {
             compressionStream = new FlushableGZIPOutputStream(fakeOutputStream);
         }
-        compressionStream.write(chunk.getBytes(), chunk.getStart(), 
+        compressionStream.write(chunk.getBytes(), chunk.getStart(),
                                 chunk.getLength());
         return chunk.getLength();
     }
@@ -109,7 +109,7 @@ public class GzipOutputFilter implements
     }
 
     /**
-     * Some filters need additional parameters from the response. All the 
+     * Some filters need additional parameters from the response. All the
      * necessary reading can occur in that method, as this method is called
      * after the response header processing is complete.
      */
@@ -164,7 +164,7 @@ public class GzipOutputFilter implements
         @Override
         public void write(int b)
             throws IOException {
-            // Shouldn't get used for good performance, but is needed for 
+            // Shouldn't get used for good performance, but is needed for
             // compatibility with Sun JDK 1.4.0
             singleByteBuffer[0] = (byte) (b & 0xff);
             outputChunk.setBytes(singleByteBuffer, 0, 1);

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java Sat Oct 22 20:59:39 2011
@@ -27,7 +27,7 @@ import org.apache.tomcat.util.buf.ByteCh
 
 /**
  * Identity input filter.
- * 
+ *
  * @author Remy Maucherat
  */
 public class IdentityInputFilter implements InputFilter {
@@ -100,10 +100,10 @@ public class IdentityInputFilter impleme
 
     /**
      * Read bytes.
-     * 
+     *
      * @return If the filter does request length control, this value is
      * significant; it should be the number of bytes consumed from the buffer,
-     * up until the end of the current request body, or the buffer length, 
+     * up until the end of the current request body, or the buffer length,
      * whichever is greater. If the filter does not do request body length
      * control, the returned value should be -1.
      */
@@ -120,7 +120,7 @@ public class IdentityInputFilter impleme
                     // The chunk is longer than the number of bytes remaining
                     // in the body; changing the chunk length to the number
                     // of bytes remaining
-                    chunk.setBytes(chunk.getBytes(), chunk.getStart(), 
+                    chunk.setBytes(chunk.getBytes(), chunk.getStart(),
                                    (int) remaining);
                     result = (int) remaining;
                 } else {
@@ -128,7 +128,7 @@ public class IdentityInputFilter impleme
                 }
                 remaining = remaining - nRead;
             } else {
-                // No more bytes left to be read : return -1 and clear the 
+                // No more bytes left to be read : return -1 and clear the
                 // buffer
                 chunk.recycle();
                 result = -1;
@@ -183,7 +183,7 @@ public class IdentityInputFilter impleme
     public int available() {
         return 0;
     }
-    
+
 
     /**
      * Set the next buffer in the filter pipeline.
@@ -206,7 +206,7 @@ public class IdentityInputFilter impleme
 
 
     /**
-     * Return the name of the associated encoding; Here, the value is 
+     * Return the name of the associated encoding; Here, the value is
      * "identity".
      */
     @Override

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java Sat Oct 22 20:59:39 2011
@@ -26,7 +26,7 @@ import org.apache.tomcat.util.buf.ByteCh
 
 /**
  * Identity output filter.
- * 
+ *
  * @author Remy Maucherat
  */
 public class IdentityOutputFilter implements OutputFilter {
@@ -58,7 +58,7 @@ public class IdentityOutputFilter implem
 
     /**
      * Write some bytes.
-     * 
+     *
      * @return number of bytes written by the filter
      */
     @Override
@@ -74,7 +74,7 @@ public class IdentityOutputFilter implem
                     // The chunk is longer than the number of bytes remaining
                     // in the body; changing the chunk length to the number
                     // of bytes remaining
-                    chunk.setBytes(chunk.getBytes(), chunk.getStart(), 
+                    chunk.setBytes(chunk.getBytes(), chunk.getStart(),
                                    (int) remaining);
                     result = (int) remaining;
                     remaining = 0;
@@ -83,7 +83,7 @@ public class IdentityOutputFilter implem
                 }
                 buffer.doWrite(chunk, res);
             } else {
-                // No more bytes left to be written : return -1 and clear the 
+                // No more bytes left to be written : return -1 and clear the
                 // buffer
                 chunk.recycle();
                 result = -1;
@@ -109,7 +109,7 @@ public class IdentityOutputFilter implem
 
 
     /**
-     * Some filters need additional parameters from the response. All the 
+     * Some filters need additional parameters from the response. All the
      * necessary reading can occur in that method, as this method is called
      * after the response header processing is complete.
      */

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java Sat Oct 22 20:59:39 2011
@@ -36,7 +36,7 @@ public class SavedRequestInputFilter imp
 
     /**
      * Create a new SavedRequestInputFilter.
-     * 
+     *
      * @param input The saved request body to be replayed.
      */
     public SavedRequestInputFilter(ByteChunk input) {
@@ -50,20 +50,20 @@ public class SavedRequestInputFilter imp
     public int doRead(ByteChunk chunk, org.apache.coyote.Request request)
             throws IOException {
         int writeLength = 0;
-        
+
         if (chunk.getLimit() > 0 && chunk.getLimit() < input.getLength()) {
             writeLength = chunk.getLimit();
         } else {
             writeLength = input.getLength();
         }
-        
+
         if(input.getOffset()>= input.getEnd())
             return -1;
-        
+
         input.substract(chunk.getBuffer(), 0, writeLength);
         chunk.setOffset(0);
         chunk.setEnd(writeLength);
-        
+
         return writeLength;
     }
 
@@ -106,7 +106,7 @@ public class SavedRequestInputFilter imp
     public int available() {
         return input.getLength();
     }
-    
+
     /**
      * End the current request (has no effect).
      */

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/VoidInputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/VoidInputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/VoidInputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/VoidInputFilter.java Sat Oct 22 20:59:39 2011
@@ -28,7 +28,7 @@ import org.apache.tomcat.util.buf.ByteCh
 /**
  * Void input filter, which returns -1 when attempting a read. Used with a GET,
  * HEAD, or a similar request.
- * 
+ *
  * @author Remy Maucherat
  */
 public class VoidInputFilter implements InputFilter {
@@ -58,7 +58,7 @@ public class VoidInputFilter implements 
 
     /**
      * Write some bytes.
-     * 
+     *
      * @return number of bytes written by the filter
      */
     @Override
@@ -101,7 +101,7 @@ public class VoidInputFilter implements 
 
 
     /**
-     * Return the name of the associated encoding; Here, the value is 
+     * Return the name of the associated encoding; Here, the value is
      * "void".
      */
     @Override
@@ -113,10 +113,10 @@ public class VoidInputFilter implements 
     /**
      * End the current request. It is acceptable to write extra bytes using
      * buffer.doWrite during the execution of this method.
-     * 
-     * @return Should return 0 unless the filter does some content length 
+     *
+     * @return Should return 0 unless the filter does some content length
      * delimitation, in which case the number is the amount of extra bytes or
-     * missing bytes, which would indicate an error. 
+     * missing bytes, which would indicate an error.
      * Note: It is recommended that extra bytes be swallowed by the filter.
      */
     @Override
@@ -133,5 +133,5 @@ public class VoidInputFilter implements 
     public int available() {
         return 0;
     }
-    
+
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/VoidOutputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/VoidOutputFilter.java?rev=1187780&r1=1187779&r2=1187780&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/VoidOutputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/VoidOutputFilter.java Sat Oct 22 20:59:39 2011
@@ -27,7 +27,7 @@ import org.apache.tomcat.util.buf.ByteCh
 /**
  * Void output filter, which silently swallows bytes written. Used with a 204
  * status (no content) or a HEAD request.
- * 
+ *
  * @author Remy Maucherat
  */
 public class VoidOutputFilter implements OutputFilter {
@@ -38,7 +38,7 @@ public class VoidOutputFilter implements
 
     /**
      * Write some bytes.
-     * 
+     *
      * @return number of bytes written by the filter
      */
     @Override
@@ -60,7 +60,7 @@ public class VoidOutputFilter implements
 
 
     /**
-     * Some filters need additional parameters from the response. All the 
+     * Some filters need additional parameters from the response. All the
      * necessary reading can occur in that method, as this method is called
      * after the response header processing is complete.
      */
@@ -91,10 +91,10 @@ public class VoidOutputFilter implements
     /**
      * End the current request. It is acceptable to write extra bytes using
      * buffer.doWrite during the execution of this method.
-     * 
-     * @return Should return 0 unless the filter does some content length 
+     *
+     * @return Should return 0 unless the filter does some content length
      * delimitation, in which case the number is the amount of extra bytes or
-     * missing bytes, which would indicate an error. 
+     * missing bytes, which would indicate an error.
      * Note: It is recommended that extra bytes be swallowed by the filter.
      */
     @Override



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