Commit 7dfa20b8 authored by Joel Martin's avatar Joel Martin

Remove invalid pos check from web-socket-js.

parent 094b489b
......@@ -187,6 +187,7 @@ public class WebSocket extends EventDispatcher {
main.log("request header:\n" + req);
socket.writeUTFBytes(req);
main.log("sent key3: " + key3);
main.log("expected digest: " + expectedDigest);
writeBytes(key3);
socket.flush();
}
......@@ -250,7 +251,6 @@ public class WebSocket extends EventDispatcher {
pos = -1;
}
} else if (headerState == 4) {
if (pos == 15) {
var replyDigest:String = readBytes(buffer, 16);
main.log("reply digest: " + replyDigest);
if (replyDigest != expectedDigest) {
......@@ -263,7 +263,6 @@ public class WebSocket extends EventDispatcher {
readyState = OPEN;
notifyStateChange();
dispatchEvent(new Event("open"));
}
} else {
if (buffer[pos] == 0xff) {
//if (buffer.bytesAvailable > 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment