tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1661519 - in /tomcat/trunk/java/org/apache/tomcat/websocket/server: WsFrameServer.java WsHttpUpgradeHandler.java
Date Sun, 22 Feb 2015 18:49:47 GMT
Author: markt
Date: Sun Feb 22 18:49:47 2015
New Revision: 1661519

URL: http://svn.apache.org/r1661519
Log:
Align WebSocket impl with changes to upgrade end-of-stream handling

Modified:
    tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java
    tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java?rev=1661519&r1=1661518&r2=1661519&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java Sun Feb 22 18:49:47
2015
@@ -16,7 +16,6 @@
  */
 package org.apache.tomcat.websocket.server;
 
-import java.io.EOFException;
 import java.io.IOException;
 
 import javax.servlet.ServletInputStream;
@@ -50,12 +49,9 @@ public class WsFrameServer extends WsFra
                 // Fill up the input buffer with as much data as we can
                 int read = sis.read(
                         inputBuffer, writePos, inputBuffer.length - writePos);
-                if (read == 0) {
+                if (read <= 0) {
                     return;
                 }
-                if (read == -1) {
-                    throw new EOFException();
-                }
                 writePos += read;
                 processInputBuffer();
             }

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java?rev=1661519&r1=1661518&r2=1661519&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java Sun Feb
22 18:49:47 2015
@@ -218,8 +218,7 @@ public class WsHttpUpgradeHandler implem
 
         @Override
         public void onAllDataRead() {
-            // Will never happen with WebSocket
-            throw new IllegalStateException();
+            // NO-OP
         }
 
 



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


Mime
View raw message