Author: markt
Date: Mon Mar 18 20:09:59 2013
New Revision: 1457963
URL: http://svn.apache.org/r1457963
Log:
Don't look for mask if it isn't there. (Processing of short frames was broken
on the client.)
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java?rev=1457963&r1=1457962&r2=1457963&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Mon Mar 18
20:09:59 2013
@@ -198,7 +198,12 @@ public abstract class WsFrameBase {
*/
private boolean processRemainingHeader() throws IOException {
// Ignore the 2 bytes already read. 4 for the mask
- int headerLength = 4;
+ int headerLength;
+ if (isMasked()) {
+ headerLength = 4;
+ } else {
+ headerLength = 0;
+ }
// Add additional bytes depending on length
if (payloadLength == 126) {
headerLength += 2;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]