tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r832951 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/ http11/filters/
Date Thu, 05 Nov 2009 01:14:17 GMT
Author: markt
Date: Thu Nov  5 01:14:16 2009
New Revision: 832951

URL: http://svn.apache.org/viewvc?rev=832951&view=rev
Log:
Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48132
Patch provided by sebb

Modified:
    tomcat/trunk/java/org/apache/coyote/Request.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
    tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java
    tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
    tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
    tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java
    tomcat/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java

Modified: tomcat/trunk/java/org/apache/coyote/Request.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Request.java?rev=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/Request.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Request.java Thu Nov  5 01:14:16 2009
@@ -434,6 +434,7 @@
 
     // -------------------- debug --------------------
 
+    @Override
     public String toString() {
         return "R( " + requestURI().toString() + ")";
     }

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Thu Nov  5 01:14:16 2009
@@ -327,6 +327,7 @@
         protected ConcurrentLinkedQueue<AjpAprProcessor> recycledProcessors = 
             new ConcurrentLinkedQueue<AjpAprProcessor>() {
             protected AtomicInteger size = new AtomicInteger(0);
+            @Override
             public boolean offer(AjpAprProcessor processor) {
                 boolean offer = (proto.processorCache == -1) ? true : (size.get() < proto.processorCache);
                 //avoid over growing our cache or add after we have stopped
@@ -341,6 +342,7 @@
                 return result;
             }
             
+            @Override
             public AjpAprProcessor poll() {
                 AjpAprProcessor result = super.poll();
                 if ( result != null ) {
@@ -349,6 +351,7 @@
                 return result;
             }
             
+            @Override
             public void clear() {
                 AjpAprProcessor next = poll();
                 while ( next != null ) {

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Thu Nov  5 01:14:16 2009
@@ -321,6 +321,7 @@
         protected ConcurrentLinkedQueue<AjpProcessor> recycledProcessors = 
             new ConcurrentLinkedQueue<AjpProcessor>() {
             protected AtomicInteger size = new AtomicInteger(0);
+            @Override
             public boolean offer(AjpProcessor processor) {
                 boolean offer = (proto.processorCache == -1) ? true : (size.get() < proto.processorCache);
                 //avoid over growing our cache or add after we have stopped
@@ -335,6 +336,7 @@
                 return result;
             }
             
+            @Override
             public AjpProcessor poll() {
                 AjpProcessor result = super.poll();
                 if ( result != null ) {
@@ -343,6 +345,7 @@
                 return result;
             }
             
+            @Override
             public void clear() {
                 AjpProcessor next = poll();
                 while ( next != null ) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Thu Nov  5 01:14:16
2009
@@ -478,6 +478,7 @@
         protected ConcurrentLinkedQueue<Http11AprProcessor> recycledProcessors = 
             new ConcurrentLinkedQueue<Http11AprProcessor>() {
             protected AtomicInteger size = new AtomicInteger(0);
+            @Override
             public boolean offer(Http11AprProcessor processor) {
                 boolean offer = (proto.processorCache == -1) ? true : (size.get() < proto.processorCache);
                 //avoid over growing our cache or add after we have stopped
@@ -492,6 +493,7 @@
                 return result;
             }
             
+            @Override
             public Http11AprProcessor poll() {
                 Http11AprProcessor result = super.poll();
                 if ( result != null ) {
@@ -500,6 +502,7 @@
                 return result;
             }
             
+            @Override
             public void clear() {
                 Http11AprProcessor next = poll();
                 while ( next != null ) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Thu Nov  5 01:14:16
2009
@@ -1253,6 +1253,7 @@
      * Specialized utility method: find a sequence of lower case bytes inside
      * a ByteChunk.
      */
+    @Override
     protected int findBytes(ByteChunk bc, byte[] b) {
 
         byte first = b[0];
@@ -1281,6 +1282,7 @@
      * Determine if we must drop the connection because of the HTTP status
      * code.  Use the same list of codes as Apache/httpd.
      */
+    @Override
     protected boolean statusDropsConnection(int status) {
         return status == 400 /* SC_BAD_REQUEST */ ||
                status == 408 /* SC_REQUEST_TIMEOUT */ ||

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Thu Nov  5 01:14:16
2009
@@ -600,6 +600,7 @@
             new ConcurrentHashMap<NioChannel, Http11NioProcessor>();
         protected ConcurrentLinkedQueue<Http11NioProcessor> recycledProcessors = new
ConcurrentLinkedQueue<Http11NioProcessor>() {
             protected AtomicInteger size = new AtomicInteger(0);
+            @Override
             public boolean offer(Http11NioProcessor processor) {
                 boolean offer = proto.processorCache==-1?true:size.get() < proto.processorCache;
                 //avoid over growing our cache or add after we have stopped
@@ -614,6 +615,7 @@
                 return result;
             }
             
+            @Override
             public Http11NioProcessor poll() {
                 Http11NioProcessor result = super.poll();
                 if ( result != null ) {
@@ -622,6 +624,7 @@
                 return result;
             }
             
+            @Override
             public void clear() {
                 Http11NioProcessor next = poll();
                 while ( next != null ) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Thu Nov  5 01:14:16 2009
@@ -1016,6 +1016,7 @@
      * Set the socket buffer flag.
      * @Override
      */
+    @Override
     public void setSocketBuffer(int socketBuffer) {
         super.setSocketBuffer(socketBuffer);
         outputBuffer.setSocketBuffer(socketBuffer);

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Thu Nov  5 01:14:16 2009
@@ -531,6 +531,7 @@
         protected ConcurrentLinkedQueue<Http11Processor> recycledProcessors = 
             new ConcurrentLinkedQueue<Http11Processor>() {
             protected AtomicInteger size = new AtomicInteger(0);
+            @Override
             public boolean offer(Http11Processor processor) {
                 boolean offer = (proto.processorCache == -1) ? true : (size.get() < proto.processorCache);
                 //avoid over growing our cache or add after we have stopped
@@ -545,6 +546,7 @@
                 return result;
             }
             
+            @Override
             public Http11Processor poll() {
                 Http11Processor result = super.poll();
                 if ( result != null ) {
@@ -553,6 +555,7 @@
                 return result;
             }
             
+            @Override
             public void clear() {
                 Http11Processor next = poll();
                 while ( next != null ) {

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=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java Thu Nov  5 01:14:16
2009
@@ -72,6 +72,7 @@
      * read operations, or if the given buffer is not big enough to accomodate
      * the whole line.
      */
+    @Override
     public boolean parseRequestLine(boolean useAvailableDataOnly)
     
         throws IOException {
@@ -249,6 +250,7 @@
     /**
      * Parse the HTTP headers.
      */
+    @Override
     public boolean parseHeaders()
         throws IOException {
 
@@ -433,6 +435,7 @@
         return fill(true);
     }
 
+    @Override
     protected boolean fill(boolean block) throws IOException {
 
         int nRead = 0;

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=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Thu Nov  5 01:14:16
2009
@@ -153,6 +153,7 @@
      * Recycle the input buffer. This should be called when closing the 
      * connection.
      */
+    @Override
     public void recycle() {
         super.recycle();
         // Recycle filters
@@ -176,6 +177,7 @@
      * consumed. This method only resets all the pointers so that we are ready
      * to parse the next HTTP request.
      */
+    @Override
     public void nextRequest() {
         super.nextRequest();
         parsingHeader = true;
@@ -199,6 +201,7 @@
      * @return true if data is properly fed; false if no data is available 
      * immediately and thread should be freed
      */
+    @Override
     public boolean parseRequestLine(boolean useAvailableDataOnly)
         throws IOException {
 
@@ -425,6 +428,7 @@
     /**
      * Parse the HTTP headers.
      */
+    @Override
     public boolean parseHeaders()
         throws IOException {
         HeaderParseStatus status = HeaderParseStatus.HAVE_MORE_HEADERS;
@@ -654,6 +658,7 @@
      * 
      * @return false if at end of stream
      */
+    @Override
     protected boolean fill(boolean block) throws IOException, EOFException {
         return fill(true,block);
     }

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=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Thu Nov  5 01:14:16
2009
@@ -182,6 +182,7 @@
     /** 
      * Send an acknoledgement.
      */
+    @Override
     public void sendAck() throws IOException {
 
         if (!committed) {
@@ -237,6 +238,7 @@
      * 
      * @throws IOException an undelying I/O error occured
      */
+    @Override
     protected void commit()
         throws IOException {
 

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=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java Thu Nov  5 01:14:16
2009
@@ -135,6 +135,7 @@
      * 
      * @throws IOException an underlying I/O error occurred
      */
+    @Override
     public void flush()
         throws IOException {
 
@@ -155,6 +156,7 @@
      * Recycle the output buffer. This should be called when closing the 
      * connection.
      */
+    @Override
     public void recycle() {
         super.recycle();
         socketBuffer.recycle();
@@ -168,6 +170,7 @@
      * consumed. This method only resets all the pointers so that we are ready
      * to parse the next HTTP request.
      */
+    @Override
     public void nextRequest() {
         super.nextRequest();
         socketBuffer.recycle();
@@ -179,6 +182,7 @@
      * 
      * @throws IOException an underlying I/O error occurred
      */
+    @Override
     public void endRequest()
         throws IOException {
         super.endRequest();
@@ -194,6 +198,7 @@
     /**
      * Send an acknoledgement.
      */
+    @Override
     public void sendAck()
         throws IOException {
 
@@ -212,6 +217,7 @@
      * 
      * @throws IOException an undelying I/O error occured
      */
+    @Override
     protected void commit()
         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=832951&r1=832950&r2=832951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/GzipOutputFilter.java Thu Nov  5 01:14:16
2009
@@ -150,6 +150,7 @@
         extends OutputStream {
         protected ByteChunk outputChunk = new ByteChunk();
         protected byte[] singleByteBuffer = new byte[1];
+        @Override
         public void write(int b)
             throws IOException {
             // Shouldn't get used for good performance, but is needed for 
@@ -158,12 +159,15 @@
             outputChunk.setBytes(singleByteBuffer, 0, 1);
             buffer.doWrite(outputChunk, null);
         }
+        @Override
         public void write(byte[] b, int off, int len)
             throws IOException {
             outputChunk.setBytes(b, off, len);
             buffer.doWrite(outputChunk, null);
         }
+        @Override
         public void flush() throws IOException {}
+        @Override
         public void close() throws IOException {}
     }
 



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


Mime
View raw message