Diff

plugins/mod_compression.lua @ 3127:94639081f327

mod_compression: Update for new session.data() syntax, fixes invalid XML errors after compression negotiation (thanks hg bisect)
author Matthew Wild <mwild1@gmail.com>
date Sat, 29 May 2010 02:08:11 +0100
parent 2892:9f214431de29
child 3148:a83a995fe5db
line wrap: on
line diff
--- a/plugins/mod_compression.lua	Sun May 09 20:48:21 2010 +0100
+++ b/plugins/mod_compression.lua	Sat May 29 02:08:11 2010 +0100
@@ -119,7 +119,7 @@
 -- setup decompression for a stream
 local function setup_decompression(session, inflate_stream)
 	local old_data = session.data
-	session.data = function(conn, data)
+	session.data = function(data)
 			local status, decompressed, eof = pcall(inflate_stream, data);
 			if status == false then
 				session:close({
@@ -130,7 +130,7 @@
 				module:log("warn", "%s", tostring(decompressed));
 				return;
 			end
-			old_data(conn, decompressed);
+			old_data(decompressed);
 		end;
 end