Fixed wrong content length for websocket handshake messages

This commit is contained in:
Trustin Lee 2010-06-22 07:02:27 +00:00
parent 7df28adfe3
commit 685153663e

View File

@ -123,8 +123,7 @@ public class WebSocketServerHandler extends SimpleChannelUpstreamHandler {
input.writeInt(b);
input.writeLong(c);
ChannelBuffer output = ChannelBuffers.wrappedBuffer(
MessageDigest.getInstance("MD5").digest(input.array()),
new byte[] { '\r', '\n' });
MessageDigest.getInstance("MD5").digest(input.array()));
res.setContent(output);
} else {
// Old handshake method with no challenge: