Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2012-07-18 20:23:07 +0000
committerJoakim Erdfelt2012-07-18 20:23:07 +0000
commit796e240545be41b1777bfea924c57f53251733a3 (patch)
tree844b8e770bcb182acf1d9129dbb166b913b92a35
parent1c77ef07232b276d1209b595b2807bc0d6fd6abe (diff)
downloadorg.eclipse.jetty.project-PRE-MERGE-20120719-1138.tar.gz
org.eclipse.jetty.project-PRE-MERGE-20120719-1138.tar.xz
org.eclipse.jetty.project-PRE-MERGE-20120719-1138.zip
Fixing aggregate message echo testPRE-MERGE-20120719-1138
-rw-r--r--jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/protocol/WebSocketFrame.java2
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java4
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java3
3 files changed, 3 insertions, 6 deletions
diff --git a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/protocol/WebSocketFrame.java b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/protocol/WebSocketFrame.java
index c56e428760..7a1e7edbb9 100644
--- a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/protocol/WebSocketFrame.java
+++ b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/protocol/WebSocketFrame.java
@@ -139,6 +139,8 @@ public class WebSocketFrame implements Frame
mask = new byte[copy.mask.length];
System.arraycopy(copy.mask,0,mask,0,mask.length);
}
+ payloadLength = copy.payloadLength;
+ payloadStart = copy.payloadStart;
data = copy.data.slice();
continuationIndex = copy.continuationIndex;
continuation = copy.continuation;
diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java
index a2bd5e5ae9..8829d0e865 100644
--- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java
+++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java
@@ -24,7 +24,6 @@ import java.util.Arrays;
import java.util.Queue;
import java.util.concurrent.TimeUnit;
-import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.FutureCallback;
import org.eclipse.jetty.util.Utf8Appendable.NotUtf8Exception;
import org.eclipse.jetty.util.Utf8StringBuilder;
@@ -321,7 +320,6 @@ public class WebSocketServletRFCTest
WebSocketFrame bin = WebSocketFrame.binary(buf).setFin(true);
ByteBuffer bb = generator.generate(bin);
- BufferUtil.flipToFlush(bb,0);
try
{
client.writeRaw(bb);
@@ -363,7 +361,6 @@ public class WebSocketServletRFCTest
WebSocketFrame text = WebSocketFrame.text().setPayload(buf).setFin(true);
ByteBuffer bb = generator.generate(text);
- BufferUtil.flipToFlush(bb,0);
try
{
client.writeRaw(bb);
@@ -402,7 +399,6 @@ public class WebSocketServletRFCTest
WebSocketFrame txt = WebSocketFrame.text().setPayload(buf);
ByteBuffer bb = generator.generate(txt);
- BufferUtil.flipToFlush(bb,0);
client.writeRaw(bb);
Queue<WebSocketFrame> frames = client.readFrames(1,TimeUnit.SECONDS,1);
diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java
index 46e27e050b..ae4aeeb890 100644
--- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java
+++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java
@@ -416,8 +416,7 @@ public class BlockheadClient implements IncomingFrames
{
LOG.debug("writing out: {}",BufferUtil.toDetailString(buf));
}
- byte arr[] = BufferUtil.toArray(buf);
- out.write(arr,0,arr.length);
+ BufferUtil.writeTo(buf,out);
out.flush();
if (frame.getOpCode() == OpCode.CLOSE)

Back to the top