mod_websocket: Fix frame length calculation
authorFlorian Zeitz <florob@babelmonkeys.de>
Thu, 04 Oct 2012 16:38:39 +0200
changeset 840 f568661c9d39
parent 839 d297d76010d4
child 841 0649883de4d3
mod_websocket: Fix frame length calculation
mod_websocket/mod_websocket.lua
--- a/mod_websocket/mod_websocket.lua	Thu Oct 04 16:37:33 2012 +0200
+++ b/mod_websocket/mod_websocket.lua	Thu Oct 04 16:38:39 2012 +0200
@@ -69,7 +69,7 @@
 
 	for i = 1, length_bytes do
 		pos = pos + 1;
-		result.length = result.length * 255 + string.byte(frame, pos);
+		result.length = result.length * 256 + string.byte(frame, pos);
 	end
 
 	if result.MASK then