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 2013/03/18 21:09:59 UTC
svn commit: r1457963 -
/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org