mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 06:07:37 +03:00
mod_compression: Update for new session.data() syntax, fixes invalid XML errors after compression negotiation (thanks hg bisect)
This commit is contained in:
parent
42d89c47c7
commit
247b811e65
1 changed files with 2 additions and 2 deletions
|
@ -119,7 +119,7 @@ end
|
|||
-- 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 @@ local function setup_decompression(session, inflate_stream)
|
|||
module:log("warn", "%s", tostring(decompressed));
|
||||
return;
|
||||
end
|
||||
old_data(conn, decompressed);
|
||||
old_data(decompressed);
|
||||
end;
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue