tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1514695 - in /tomcat/tc7.0.x/trunk/java/org/apache: coyote/AbstractProtocol.java coyote/http11/AbstractHttp11Processor.java tomcat/util/net/AbstractEndpoint.java tomcat/util/net/JIoEndpoint.java
Date Fri, 16 Aug 2013 13:14:11 GMT
Author: markt
Date: Fri Aug 16 13:14:11 2013
New Revision: 1514695

URL: http://svn.apache.org/r1514695
Log:
Back-porting JSR-356
Rename SocketState.UPGRADING -> SocketStatus.UPGRADING_TOMCAT to indicate a Tomcat proprietary
HTTP upgrade is in progress
Add SocketStatus.UPGRADING to indicate a Servlet 3.1 style HTTP upgrade is in progress.

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java
    tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1514695&r1=1514694&r2=1514695&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Aug 16 13:14:11
2013
@@ -590,6 +590,8 @@ public abstract class AbstractProtocol i
                         state = processor.event(status);
                     } else if (processor.getUpgradeInbound() != null) {
                         state = processor.upgradeDispatch();
+                    } else if (processor.isUpgrade()) {
+                        state = processor.upgradeDispatch(status);
                     } else {
                         state = processor.process(socket);
                     }
@@ -598,7 +600,7 @@ public abstract class AbstractProtocol i
                         state = processor.asyncPostProcess();
                     }
 
-                    if (state == SocketState.UPGRADING) {
+                    if (state == SocketState.UPGRADING_TOMCAT) {
                         // Get the UpgradeInbound handler
                         UpgradeInbound inbound = processor.getUpgradeInbound();
                         // Release the Http11 processor to be re-used
@@ -608,7 +610,7 @@ public abstract class AbstractProtocol i
                         inbound.onUpgradeComplete();
                     }
                 } while (state == SocketState.ASYNC_END ||
-                        state == SocketState.UPGRADING);
+                        state == SocketState.UPGRADING_TOMCAT);
 
                 if (state == SocketState.LONG) {
                     // In the middle of processing a request/response. Keep the

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1514695&r1=1514694&r2=1514695&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Fri Aug
16 13:14:11 2013
@@ -1117,7 +1117,7 @@ public abstract class AbstractHttp11Proc
         } else if (isAsync() || comet) {
             return SocketState.LONG;
         } else if (getUpgradeInbound() != null) {
-            return SocketState.UPGRADING;
+            return SocketState.UPGRADING_TOMCAT;
         } else {
             if (sendfileInProgress) {
                 return SocketState.SENDFILE;

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1514695&r1=1514694&r2=1514695&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Fri Aug 16
13:14:11 2013
@@ -55,7 +55,8 @@ public abstract class AbstractEndpoint {
         public enum SocketState {
             // TODO Add a new state to the AsyncStateMachine and remove
             //      ASYNC_END (if possible)
-            OPEN, CLOSED, LONG, ASYNC_END, SENDFILE, UPGRADING, UPGRADED
+            OPEN, CLOSED, LONG, ASYNC_END, SENDFILE, UPGRADING_TOMCAT,
+            UPGRADING, UPGRADED
         }
 
 

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=1514695&r1=1514694&r2=1514695&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Fri Aug 16 13:14:11
2013
@@ -324,7 +324,7 @@ public class JIoEndpoint extends Abstrac
                             // Ignore
                         }
                     } else if (state == SocketState.OPEN ||
-                            state == SocketState.UPGRADING  ||
+                            state == SocketState.UPGRADING_TOMCAT  ||
                             state == SocketState.UPGRADED){
                         socket.setKeptAlive(true);
                         socket.access();



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


Mime
View raw message