From 89a26e6d758115f42a38071baa8845b8399675b3 Mon Sep 17 00:00:00 2001 From: Jesse McConnell Date: Tue, 26 Jun 2012 11:14:34 -0500 Subject: [PATCH] add note to 64bit length code in frame generator --- .../jetty/websocket/generator/FrameGenerator.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/generator/FrameGenerator.java b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/generator/FrameGenerator.java index dad21e71ab0..60c8d494655 100644 --- a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/generator/FrameGenerator.java +++ b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/generator/FrameGenerator.java @@ -77,11 +77,11 @@ public abstract class FrameGenerator { // we have a 64 bit length b |= 0x7F; - framing.put(b); // indicate 4 byte length - framing.put((byte)0); - framing.put((byte)0); - framing.put((byte)0); - framing.put((byte)0); + framing.put(b); // indicate 8 byte length + framing.put((byte)0); // + framing.put((byte)0); // anything over an + framing.put((byte)0); // int is just + framing.put((byte)0); // intsane! framing.put((byte)((payloadLength>>24) & 0xFF)); framing.put((byte)((payloadLength>>16) & 0xFF)); framing.put((byte)((payloadLength>>8) & 0xFF));